Posted by Arsenalist on November 20, 2007
This entry was posted on November 20, 2007 at 2:05 pm and is filed under java, tech.
Tagged: @onetoone, database, ejb, hibernate, java persistence api, jpa, jpql, orm, sql, toplink, toplink essentials. You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
Tech Per said
Hi, nice example of left outer join. You write:
…an installment of documenting something that should be already documented.
I don’t know if you mean that it isn’t documented, because it is. Quite well, actually. In part 4.4.5.2 in the persistence part of the specifaction of EJB3.0. This is JSR-220.
Web 2.0 Announcer said
Performing a LEFT OUTER JOIN using JPQL and JPA
[...]Haven’t made a tutorial-type post in a while so here’s an installment of documenting something that should be already documented. The problem at hand is s very common one: how do you do a LEFT OUTER JOIN on two tables (entities) when you’re …
Verdeen said
Good example, the bridge from SQL to ORM query languages such as HQL and JPQL is often too confusing and the underlying SQL that is generated is vastly different from the actual query. There needs to be a reverse engineering tool from SQL to JPQL.
666snippets said
*searches JPQL tutorials*
666snippets said
looking at this increments my love for iBatis
vardomn said
c4torcadomtr
Jhoss said
Hi, I’m from Bolivia, and I want to know JPQL, a basic example… please…
Mike said
Great Left Outer Join Example, Thank you!
Nate said
Thank you for the easy to follow example. My situation, however, is a bit more complex. I’m joining on dates and in the first table, the date is represented as an integer (yyyyMMdd) and in the second, as a date field.
I’ve tried everything including using the getter/setter methods to convert the Date to a Long and back, but I always get a “java.sql.SQLException: [SQL0401] Comparison operator = operands not compatible.” as the SQL it generates seems to be be comparing the data types as they’re stored in the database and I’m not sure how to get JPA/Toplink to do otherwise.