Title:
ORM entities are incorrectly created when using single table inheritance with mappedSuperClass
| View in TrackerStatus/Resolution/Reason: To Fix//Bounced
Reporter/Name(from Bugbase): Mingo Hagen / Mingo Hagen (Mingo Hagen)
Created: 07/22/2015
Components: ORM Support
Versions: 2016,11.0,10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 2
Related Bugs:
CF-4178506 - Similar to
CF-4178506 - Similar to
Problem Description:
When you have a base component (base.cfc) with MappedSuperClass set to true, a
persisted component (animal.cfc) inheriting from that and another (dog.cfc)
inheriting from that one ColdFusion throws an exception (a Hibernate one).
To make this bug more fun, CF doesn't always throw this exception.
The reason why this happens becomes clear when you set
this.ormsettings.savemapping=true and take a look at the hbmxml files.
The XML in dog.hbmxml contains the fields from base.cfc:
<property name="name" type="string"><column name="name"/></property>
Steps to Reproduce:
Use the files included with this bug.
Actual Result:
An exception: Repeated column in mapping for entity: {entity-name} column: {column-name} (should be mapped with insert="false" update="false")
Expected Result:
Correctly generated hibernate entities.
Any Workarounds:
You can write your own .hbmxml files to work around the problem.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4024472
External Customer Info:
External Company:
External Customer Name: Mingo
External Customer Email:
External Test Config: My Hardware and Environment details: Tested on Windows (multiple) on CF9 through 11.
Attachments:
- July 23, 2015 00:00:00: 1_bug-orm-cf11.zip
- November 18, 2015 00:00:00: 2_acf-4024472.zip
Comments: