Apr 20th, 2011, 12:36 PM
what is the best way to map a row with a composite key? Has anyone a good sample? Does i have to implement two row mappers (one for the table containing this composite primary key and one row mapper for the composite key)? What is the impact of this design?
Class A has 4 attributes
String aa (identifier)
String ab (some value)
String ac (some value)
int ad (some value)
Class B has 3 attributes
String ba (identifier 1 of composite key)
String bc (identifier 2 of composite key)
int bd (some value)
or does i have to design my second entity with
MyCompositeKey bac (composite key)
What is the best design and easiest way to map entities with data access using jdbc with spring and how can i realize it?
In Class B i have a displayNumber bd which i have to query and update afterwards while a limit ad hasn't reached
Last edited by Uenhan Inay; Apr 20th, 2011 at 12:55 PM.