mapping a class multiple times / persisting Maps #5539
gavinking
started this conversation in
Design Proposals
Replies: 1 comment 2 replies
-
As far as I understand, the Steve already started working on orm.xml extensions, so if we want further extensions, we can put that there. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From https://hibernate.atlassian.net/browse/HHH-15698:
We’ve deprecated the
hbm.xml
format without providing any replacement way to map a class with two different entity names. We have jumped through hoops in our APIs and internal implementation to support this usage.Actually, just how deprecated is it really? Sure, we don't really document it, but nor do we document
orm.xml
. The documentation is basically completely silent on the subject of XML-based mappings and you're supposed to do them.There's no straightforward way out of this, either:
hbm.xml,
since it's the only way to specify an explicit entity name,orm.xml
, but with the ability to specify entity names for entities and associations, orSession
that accept a stringentityName
, since they’re only useful with the deprecatedhbm.xml
mapping format.Note that it would not help to introduce new annotations, since you can’t define multiple mappings for a single class in annotations. (Nor you can you define mappings for Maps.)
So what we’re contemplating here is losing:
Map
.Beta Was this translation helpful? Give feedback.
All reactions