Table Per Subclass issue

19 views
Skip to first unread message

colbylitnak

unread,
Feb 13, 2012, 5:32:38 PM2/13/12
to Railo
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?

Michael Offner

unread,
Feb 14, 2012, 1:34:21 AM2/14/12
to ra...@googlegroups.com
Which version you had before?

/micha

Vo mim iPad gschickt

colbylitnak

unread,
Feb 14, 2012, 9:36:33 AM2/14/12
to Railo
I had 3.3.1.005. I didn't do any upgrades to the versions in between,
so I don't know yet which version it started happening in. Thank you!

-Colby

On Feb 13, 11:34 pm, Michael Offner <mich...@getrailo.com> wrote:
> Which version you had before?
>
> /micha
>
> Vo mim iPad gschickt
>

colbylitnak

unread,
Feb 15, 2012, 12:28:03 PM2/15/12
to Railo
In hopes of trying to narrow it down to a specific database, I tried
this on Oracle 11g, SQL Server 2008 R2, and HSQLDB, but it does the
same thing. Has anyone tried this? If so, can you reproduce it, or
does it work for you? Thank you in advance for your help, I appreciate
it. Sorry in advance if I am doing something wrong and not noticing
it.

-Colby

colbylitnak

unread,
Feb 23, 2012, 3:40:11 PM2/23/12
to Railo
It looks like this is related to https://issues.jboss.org/browse/RAILO-1758.
as soon as I turn off eventhandling it works, though some other things
don't work because my events aren't firing :(.

I'll just wait for RAILO-1758 to get fixed and then cross my fingers.
Thanks!
Reply all
Reply to author
Forward
0 new messages