|Querying ManyToMany relationship [message #650062]
||Fri, 21 January 2011 15:20
| dreske Missing name
Registered: August 2010
we have a MedaItem class, which has a bidirectional ManyToMany relationship to the Genre class.
MovieItem and SeriesItem derives from MediaItem.
How can I query this relationship to get only the MovieItems or only the SeriesItems with a specific genre?
And: which type of query is the "best" therefore? NamedQuery, Criteria Query...
Are there queries in a form like this "select item from MovieItem item where item.genres CONTAINS :genre" ?
[Updated on: Fri, 21 January 2011 15:23]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.03034 seconds