I am trying to understand how to use the composite-id with a <key-many-to-one> tag. Consider I have 2 tables:-
REF_ROUTE
route_cd(PK)
REF_ROUTE_LOCATION
route_cd(FK)
seq_num
route_cd and seq_num together form a composite-id for REF_ROUTE_LOCATION table.
Actually I am writing generic code to save, load and delete single objects from the database using reflection and hibernate. But these kind of relationships creates problems for my code.
Can someone tell me how to to proceed saving,loading,deleting single objects for this example ???? I need just the basic snippets of code used.
|