Here's my database setup:
(this is a simple EAV stucture)
-----------------------------
user_id (FK) ----| Composite key
setup_item -----|
setup_value
So, the
user_id and
setup_item makeup the composite key of the table, on the java side, the only thing to note is that
setup_item and
setup_value come from a hashmap:
Code:
// Where String is "setup_item" and Object is "setup_value"
Map<String, Object> data = new HashMap<String, Object>()
I'm trying to map this relationship in a setup.hbm.xml file, but I can't figure out how to properly fit setup_item and setup_value into the composite-id. Is there some issue with how I have this setup?