Last active
August 29, 2015 14:25
-
-
Save mjhagen/18502eb2916b8041cf1e to your computer and use it in GitHub Desktop.
Bug in ORM inheritance mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends="base" persistent="true" table="animal" | |
{ | |
property fieldType="column" name="isAlive" type="boolean" default=true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component | |
{ | |
this.name = "ormPlayground"; | |
this.datasource = "mingo"; | |
this.ormEnabled = true; | |
this.ormSettings.dbcreate = "dropcreate"; | |
function onRequestStart() | |
{ | |
ormreload(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component mappedSuperClass="true" | |
{ | |
property fieldType="id" name="id" generator="increment"; | |
property fieldType="column" name="name"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends="animal" persistent="true" table="animal" | |
{ | |
property fieldType="column" name="furColor" default="brown"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset fido = entityNew( "dog" ) /> | |
<cfset fido.setName( "Fido" ) /> | |
<cfdump var="#fido#" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes this works, but most of the time it results in this error:
Repeated column in mapping for entity: dog column: name (should be mapped with insert="false" update="false")