Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

FlexORM
Project Home Blog Forums Wiki Known Issues Contact Project

FlexORM Issue: Inheritance problems

Name: Inheritance problems
ID: 3
Project: FlexORM
Type: Bug
Area: Code
Severity: High
Status: Open
Related URL:
Creator: Luiz Alberto Zaiats
Created: 11/10/09 6:45 AM
Updated: 01/16/10 7:42 AM
Description: (1). Inheritance using classes in different packages causes an error, example:

package system.core
{

[Bindable]
public class firstClass {
public var id:int;
}

}

//

package system.utils
{

import system.core.firstClass;

[Bindable]
public class secondClass extends firstClass
{
public var myProperty:String;
}

}

//

var myInstance:secondClass = new secondClass();
myInstance.myProperty = "FlexORM Rox!";
EntityManager.instance.save(myInstance);

--> throws an error: No ID specified for secondClass!

If i put the second class in the same package as firstClass everything runs fine!

(2). Inheritance only work with 1 (one) level (remember that inheritance only works for classes in the same package as mentioned in previous item, and in this example all classes are in the same package), example:

[Bindable]
class A {
public var id:int;
}

[Bindable]
public class B extends A {
public var p1:String;
}

[Bindable]
public class C extends B {
public var p2:String;
}

//

var instanceC:C = new C();
instanceC.p1 = "B";
instanceC.p2 = "C";

EntityManager.instance.save(instanceC);

--> throws an error: SQLError: 'Error #3115: SQL Error.', details:'no such table: 'main.cs'', operation:'execute', detailID:'2013' [WHERE main.cs IS THE TABLE THAT FlexORM SHOULD STORE class C INSTANCES]

I think FlexORM isnt creating all tables when we have a multilevel inheritance ;)
History: Created by zaiats (Luiz Alberto Zaiats) : 11/10/09 6:45 AM

Comment by wchu (William Chu) : 12/18/09 3:36 AM
I too am experiencing the same issue. Can anyone confirm that inheritance beyond one level is not supported in FlexORM?

Comment by fsans (Francesc Sans) : 01/16/10 7:42 AM
Seems to me that inheritance in two or more levels does not work in async mode. Multilevel inheritance in sync mode worked fine.

To add a comment to this bug, please login using the link above.