ORM extending existing Table

Hi,

Got issues with lucee 4.5 running an ORM this type:

component entityname=“formfielddate” discriminatorcolumn=“fieldtype”
table=“formfield” extends=“formfield” persistent=“true”
{

property name=“second field” ormtype=“text” default=“”;
}

This code works perfect on ACF11 while on lucee 4.5 errors on ALL extended
orm’s I had.

Is there a solution? BUG?

M B

There’s a space in “second field”. Does ACF accept that?

I think the problem is that your subclass has no discriminatorvalue
attribute. The discriminatorcolumn should be removed there.

No the second field is a dummy name.

here a more explicit example we extend here a _base class that holds the
default set/get methods.

component entityname=“formfield” table=“formfield” persistent=“true”
discriminatorcolumn=“fieldtype” extends=“app.core.cfc.extends._base”
{
property name=“id” fieldtype=“id” generator=“native” notnull=“true”
unique=“true” ormtype=“int” unsavedvalue=“0”;

property name="enabled" ormtype="boolean" sqltype="boolean" 

default=“false” notnull=“true”;

}

component entityname=“formfieldtext” discriminatorcolumn=“fieldtype”
table=“formfield” extends=“formfield” persistent=“true”
{

property name=“maxlength” ormtype=“int” default=“0” notnull=“true”;

}

The main table is formfield while formfieldtext is extending it using
fieldtype value.

I had an ORM init error and the error gone once I removed those extended
orm files. I rolled back to ACF since lucee got such issues.

M BOn Monday, June 8, 2015 at 1:36:05 PM UTC+2, Jeroen Knoef wrote:

There’s a space in “second field”. Does ACF accept that?

HI Mehdi

Can you provide some more detail please? What’s the error message?
What does your MappedSuperClass entity look like?

Cheers
Julian.On 8 June 2015 at 10:01, Mehdi B <@Mehdi_B> wrote:

This code works perfect on ACF11 while on lucee 4.5 errors on ALL extended
orm’s I had.

You need to add a discriminatorColumn in the base class and
a discriminatorValue=“ba” and joincolumn in the concrete class.On Monday, June 8, 2015 at 4:01:14 AM UTC-5, Mehdi B wrote:

Hi,

Got issues with lucee 4.5 running an ORM this type:

component entityname=“formfielddate” discriminatorcolumn=“fieldtype”
table=“formfield” extends=“formfield” persistent=“true”
{

property name=“second field” ormtype=“text” default=“”;
}

This code works perfect on ACF11 while on lucee 4.5 errors on ALL extended
orm’s I had.

Is there a solution? BUG?

M B

agree in fact ACF is accepting such errors without throwing any warning
while lucee here point AS IT SHOULD BE.

Good point for lucee.

M BOn Monday, June 8, 2015 at 6:05:31 PM UTC+2, Luis Majano wrote:

You need to add a discriminatorColumn in the base class and
a discriminatorValue=“ba” and joincolumn in the concrete class.

On Monday, June 8, 2015 at 4:01:14 AM UTC-5, Mehdi B wrote:

Hi,

Got issues with lucee 4.5 running an ORM this type:

component entityname=“formfielddate” discriminatorcolumn=“fieldtype”
table=“formfield” extends=“formfield” persistent=“true”
{

property name=“second field” ormtype=“text” default=“”;
}

This code works perfect on ACF11 while on lucee 4.5 errors on ALL
extended orm’s I had.

Is there a solution? BUG?

M B