Hi,
I have following problem... I have POJO object with simple fields like
Code:
String property1;
String property2;
...
// getters/setters ...
Problem is, that in DB property1, property2... HAS TO BE mapped to standalone table (let's say StringPropertyTable), with foreign key to "parent table", key = "property1"/"property2", value = value of the property. How can I do that mapping in Hibernate? I thought discriminator is the key for this problem, but I can not figure out, how can I tell Hibernate that this one-to-many relation filtered by "key" is in fact one-to-one relation... POJO object and DB schema cannot be modified! Thanks for any suggestions.