Register / Login
Win a copy of
The Little Book of Impediments (e-book only)
this week in the
Agile and Other Processes
Object Relational Mapping
HQL: how to use collection value expressions?
posted 5 years ago
I'm trying to understand how the collection values expressions (minelement, etc) are supposed to be used.
Here's a query that doesn't cause an error at server start up, but returns extra copies of multi-day competitions.
@NamedQuery(name="openCompetitions", query="SELECT c FROM Competition c join c.competitionDates cd WHERE cd.date > now() ORDER BY name"),
I would have prefered somerthing without the explicit join and simply chain in the WHERE, but it sounds like that is unsupported?
Ie. something like
@NamedQuery(name="openCompetitions", query="SELECT c FROM Competition c WHERE MINELEMENT(c.competitionDates.date) > now() ORDER BY name"),
Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1
NullPointerException returned usig a StoredProcedureCall
jsf navigation and database connection
"JOIN" not working in JPA - Named Query