aspose file tools*
The moose likes Object Relational Mapping and the fly likes how to implement 'or' condition in hibernet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "how to implement Watch "how to implement New topic
Author

how to implement 'or' condition in hibernet

Ashish bharadwaj
Greenhorn

Joined: Aug 03, 2010
Posts: 3



in this condition all active user is coming if there entity status is active , but for super admin mstentity' entity is null admin is not displaying .


i want to put 'or' condition---

criteria.createAlias("mstentity", "me");
Criterion statusEntity = Restrictions.eq("me.status", Constants.ACTIVE_STATUS ); where me(entity) eq to null. plese tell how to do it

Ashish bharadwaj
Greenhorn

Joined: Aug 03, 2010
Posts: 3

Ashish bharadwaj wrote:

in this condition all active user is coming if there entity status is active , but for super admin mstentity' entity is null admin is not displaying .


i want to put 'or' condition---

criteria.createAlias("mstentity", "me");
Criterion statusEntity = Restrictions.eq("me.status", Constants.ACTIVE_STATUS ); where me(entity) eq to null. plese tell how to do it

 
 
subject: how to implement 'or' condition in hibernet