Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate 2: How I write a query that specified that a collection in an object is empty or null?

 
John Landon
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have Box. Box has collection of Items. I want to write a query that gets all Boxes with no items.
I could just get all boxes and go through all of them to check if they have no items but is there a better way?
Here are the mappings.

in Item:


in Box:


Thanks,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic