Hibernate version:
3.0.3
I'm using a table-per-class mapping strategy with some joined-subclasses, and I'd like to be able to convert an object into a subclass. I have an item persisted in my system as a generic type, and it is later converted into something more specific when a user reviews it and decides what it should be.
I've tried a couple things that haven't worked, like making a new subclass instance and copying the existing data in (including the id), but that didn't work, unsurprisingly. My only real idea at this point is to manually add a new entry to the subclass table and re-fetch, but that seems like a brittle solution.
I've searched these forums and found several other questions like this, but they were either unanswered or inapplicable. I can't be the only one trying to do this, so I'd appreciate any help.
|