I updated to 3.3.2.002 and now my ORM hierarchies (Table Per Subclass
without Discriminator) don't seem to be working, I might be doing this
wrong, so I wanted to ask if anyone has ran into this.
I can reproduce this with the "Table Per Subclass without
Discriminator" example from the ACF docs (
http://help.adobe.com/en_US/
ColdFusion/9.0/Developing/
WS027D3772-2E98-4d5b-8800-054A62EBF8D9.html#WSB268B0CB-17CB-4e28-B0D3-
ED72DF166D8E)
Payment.cfc
<cfcomponent persistent="true" table="Payment">
<cfproperty name="paymentId">
<cfproperty name="amount" notnull="true">
</cfcomponent>
CreditCardpayment.cfc
<cfcomponent persistent="true" extends="Payment"
table="CreditCardPayment"
joinColumn="paymentId">
<cfproperty name="cardNo">
<cfproperty name="cardType">
</cfcomponent>
CheckPayment.cfc
<cfcomponent persistent="true" extends="Payment" table="CheckPayment"
joinColumn="paymentId">
<cfproperty name="checkNo">
<cfproperty name="bankName">
<cfproperty name="city">
</cfcomponent>
index.cfm
<cfset local.orm = entityNew("CreditCardPayment") />
<cfset local.orm.setpaymentID(1)>
<cfset local.orm.setAmount(100) />
<cfset local.orm.setCardNo("1234-1234-1234-1234") />
<cfset local.orm.setCardType("Visa") />
<cfset entitySave(local.orm) />
<cfset ormFlush() />
I get the following error when I browse to index.cfm thrown on the
entitySave() line:
not-null property references a null or transient value:
CreditCardPayment.amount.
I know what the error means, but I don't understand how setAmount(100)
doesn't do the trick? Am I missing something?