Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter records from Hibernate Mapping file.

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one table which has hibernate mapping file. and table has one column 'IS_ACTIVE' whose value can be 'Y' or 'N'.

What i wanted to know if there is anyway i can define in mapping file that retrieves only records with IS_ACTIVE = 'Y'.

Thanks

Jigar Naik
 
Tim Holloway
Saloon Keeper
Posts: 18362
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mapping is mapping. What you want is selective querying.

To restrict the data, you should either code an appropriate query or create a database view with the query being part of the view definition and map that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic