'Component' missing in deserialized model

Hi,

Im trying to deserialize a model with the new flexo syside version 0.8. This is the original model:

package MyStructureC {

part def Component{

attribute tx;

attribute ty;

attribute tz;

attribute rx;

attribute ry;

attribute rz;

attribute typeID;

part children: Component[0..*];

}

part def Context {

part myStructureC :Component {

part nx0001g subsets children {

attribute :>> tx=1.0;

attribute :>> ty=1.0;

attribute :>> tz=1.0;

attribute :>> rx=1.0;

attribute :>> ry=1.0;

attribute :>> rz=1.0;

attribute :>> typeID = 100;

part pwr0001g subsets children {

attribute :>> tx=1.0;

attribute :>> ty=2.0;

attribute :>> tz=1.0;

attribute :>> rx=1.0;

attribute :>> ry=2.0;

attribute :>> rz=1.0;

attribute :>> typeID = 0;

}

part cmp0001g subsets children {

attribute :>> tx=1.0;

attribute :>> ty=3.0;

attribute :>> tz=1.0;

attribute :>> rx=1.0;

attribute :>> ry=3.0;

attribute :>> rz=1.0;

attribute :>> typeID = 1;

}

}

part nx0002g subsets children {

attribute :>> tx=1.0;

attribute :>> ty=1.0;

attribute :>> tz=1.0;

attribute :>> rx=1.0;

attribute :>> ry=1.0;

attribute :>> rz=1.0;

attribute :>> typeID = 100;

part pwr0002g subsets children {

attribute :>> tx=1.0;

attribute :>> ty=2.0;

attribute :>> tz=1.0;

attribute :>> rx=1.0;

attribute :>> ry=2.0;

attribute :>> rz=1.0;

attribute :>> typeID = 0;

}

}

}

}

}

after i deserialize this is what I get:

package MyStructureC {
part def Component {
attribute tx;
attribute ty;
attribute tz;
attribute rx;
attribute ry;
attribute rz;
attribute typeID;
part children : [0..*];
}
part def Context {
part myStructureC : Component {
part nx0001g :> Component::children {
attribute :>> Component::tx = 1;
attribute :>> Component::ty = 1;
attribute :>> Component::tz = 1;
attribute :>> Component::rx = 1;
attribute :>> Component::ry = 1;
attribute :>> Component::rz = 1;
attribute :>> Component::typeID = 100;
part pwr0001g :> Component::children {
attribute :>> Component::tx = 1;
attribute :>> Component::ty = 2;
attribute :>> Component::tz = 1;
attribute :>> Component::rx = 1;
attribute :>> Component::ry = 2;
attribute :>> Component::rz = 1;
attribute :>> Component::typeID = 0;
}
part cmp0001g :> Component::children {
attribute :>> Component::tx = 1;
attribute :>> Component::ty = 3;
attribute :>> Component::tz = 1;
attribute :>> Component::rx = 1;
attribute :>> Component::ry = 3;
attribute :>> Component::rz = 1;
attribute :>> Component::typeID = 1;
}
}
part nx0002g :> Component::children {
attribute :>> Component::tx = 1;
attribute :>> Component::ty = 1;
attribute :>> Component::tz = 1;
attribute :>> Component::rx = 1;
attribute :>> Component::ry = 1;
attribute :>> Component::rz = 1;
attribute :>> Component::typeID = 100;
part pwr0002g :> Component::children {
attribute :>> Component::tx = 1;
attribute :>> Component::ty = 2;
attribute :>> Component::tz = 1;
attribute :>> Component::rx = 1;
attribute :>> Component::ry = 2;
attribute :>> Component::rz = 1;
attribute :>> Component::typeID = 0;
}
}
}
}
}

the Component in part children: [0..*] is missing after deserialization.

Maybe because it’s a recursive function and it’s not being handled?

Hi @rubayet,

Thanks for the report. I can reproduce it even without flexo. Minimal repro:

part def Component {
    part children : Component;
}

Deserialization works correctly, but the printer fails.

Fixed for the next release.

Thanks @Daumantas !

v0.8.1 has been released