Hi folks. I'm using hibernate for a couple of projects just peachily, except for some problems mapping valued ternary associations. I'm interested, however, in the possibility of using hibernate on, how shall we say, some oddly normalized "legacy" databases.
For example, in this database, parent-child relationships aren't indicated by the child object storing a foreign key reference to its parent object. Rather, the parent object has a column which contains a comma-separated list of child object keys. Usually it's commas, anyway. Sometimes it's spaces. Sometimes it's both.
Another fun way they denote relationships - when there is a fixed number of parents, often the child tables will have a binary column for each parent, indicating if the child belongs to that parent or not.
Would it be terribly difficult to modify hibernate to support these weird types of schema? Would it be something you'd want to do with interceptors, or would you want to mess with hibernate itself? Just curious. I can't imagine many people would want this sort of feature, but I also can't imagine that I'm the only one who could use it either.
Thanks for any tips.
|