On 15 Dec (08:17), Konstantin Priblouda wrote: > Suppose I try to implement following: > > Address -> Country. > > Both are persistent. Address belongs to > country. How do I implement this using hibernate? > Use country_id property in Address? > Set constraint on it?
This could be mapped in different ways. Assuming that this type of association is a composition, you could use a component mapping: http://hibernate.bluemars.net/hib_docs/reference/html_single/#adv-or-mapping-s2 -- Christian Bauer [EMAIL PROTECTED] ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel