Is there a way to do a search using a partially populated object as a template? Something like:
...
MyObject result = null;
Session session = null;
try {
session = sessionFactory.openSession();
MyObject template = new MyObject();
template.setSKU(8675309);
result = session.findByTemplate(template);
} catch (HibernateException hex) {
throw new EJBException("Could not retrieve list of conferences", hex);
} finally {
if (session != null) {
try {
session.close();
} catch (HibernateException e) {
// do nothing, just log it
}
}
}
Where result could be null if there are no matches or the first match of a collection if there are multiple matches.
Thanks, Brian
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel