Hi,
I'm currently evaluating hibernate for use on a number of projects. I've used ibatis before and notice a number of features are common. One feature I can't see in hibernate is dynamic where clauses.
Is it possible to modify the where clause of named queries based upon the properties of the object passed to the query.setProperties(fooBean) method?
Taking an example from an ibatis config...
Code:
<query name="............">
select appointment.id as id, appointment_reference_no,
..........
.........
............
<dynamic>
<isNotEmpty prepend="AND" property="bookingNumber">
booking_number like '%' || #bookingNumber# || '%'
</isNotEmpty>
<isNotEmpty prepend="AND" property="containerOperatorId">
cont_operator_mapping.id=#containerOperatorId#
</isNotEmpty>
</dynamic>
</query>
thanks
Nathan