[JIRA] (HHH-15698) orm.xml mappings do not support mapping the same entity class twice
by Gavin King (JIRA)
Gavin King ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *commented* on HHH-15698 ( https://hibernate.atlassian.net/browse/HHH-15698?atlOrigin=eyJpIjoiYTk3OT... )
Re: orm.xml mappings do not support mapping the same entity class twice ( https://hibernate.atlassian.net/browse/HHH-15698?atlOrigin=eyJpIjoiYTk3OT... )
OK, so there doesn’t seem to be any very straightforward way out of this, either:
* we un-deprecate hbm.xml , since it's the only way to specify an explicit entity name,
* introduce a brand new XML mapping format, derived from orm.xml , but with the ability to specify entity names for entities and associations, or
* we deprecate the remaining methods of Session that accept a string entityName , since they’re only useful with the deprecated hbm.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 {{Map}}s.)
So what we’re contemplating here is losing:
* the ability to map a class multiple times with different entity names, and
* the ability to persist a Map.
( https://hibernate.atlassian.net/browse/HHH-15698#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15698#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:583150f )
1 year, 10 months