This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes JPA criteriaBuilder method not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "JPA criteriaBuilder method not found" Watch "JPA criteriaBuilder method not found" New topic
Author

JPA criteriaBuilder method not found

adam smith ii
Greenhorn

Joined: Feb 04, 2010
Posts: 20
Hello,
I believe I am trying to add a predicate to an EJB query and am getting a method signature error. Rather than describe an Expression,
my code describes a criteria.Path<java.lang.Object> I am trying to follow examples but am pretty confused.

The compile error is on line 72 as described above.



The Salesrecords entity follows:


James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
Not sure what your trying to do, but the line should rpobably be,

typedQuery.where(criteriaBuilder.ge(from.get("senttogrower"), new Integer(arg1)));

Your error is probably from the int, but including the full error would help.





TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
adam smith ii
Greenhorn

Joined: Feb 04, 2010
Posts: 20
James,
Thanks for the suggestion, I tried it, but it probably solves a different problem. I use Netbeans so it was a bit of work to get the error message via the command line.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPA criteriaBuilder method not found