Hi there, a good place to start is by looking at the Spring API for Hibernate Template. See
*org.springframework.orm.hibernate.HibernateTemplate* On 6/19/07, kace <[EMAIL PROTECTED]> wrote:
I have two entities user and promotions and and a I have a joined table userPromotions with `userID`, `promotionID` and an additonal column `used` and i have mapped the join table to a collection of elements. It is setup so that the ManyToOne is ponted at Users and the parent is promotions. Everytime a customer uses a promotion I need to update `used` column but Im not sure how to get access to the used column. Should I be returning userPromotions object or the parent object like so public Promotions getPromotionsUsed(Long id) { return (Promotions) getHibernateTemplate().find("from Promotions p join p.userPromotions where Id=?", id); } If i return userPromotions I would need to pass in userid and promotionID but im not sure how to deal with more than one parameter in the above hibernate code. Can someone bring me onto the right track. Should I be mapping the join table to an intermediate entity instead? Thanks kace -- View this message in context: http://www.nabble.com/hibernate-query-related-tf3947109s2369.html#a11197061 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- /fadhli