I'm fairly new to all this and am having a conceptual problem. I've been wading through documentation, but I'm not even sure where I'm supposed to be looking anymore :S
I had an idea that if I use a base class as below, then users could subclass it for there own logic (storing all data in the map rather than instance variables), and hibernate would be able to persist it without changing the DB structure using a single_table inheritance strategy.
1) Is this idea valid?
2) What association is needed to persist the map? It's a component, right? I was thinking a schema along these lines:
Discount
- Id
DiscountParameter
- DiscountId (foreign key to Discount)
- Key
- Value
I've tried a heap of different things, but can't quite get my head around how OneToMany or ManyToMany relates to this situation.
Thanks,
- Xavier
I posted this on the Hibernate Users forum to no avail