but to recovery Material and all proveedorMaterial, i has a problem, don't mistake. I want proveedor Object, but when recovery this property is nothing, but the codigoProveedor is correct. Why I don't recovery tha estructure complete, if i specified in the XML retriveautomatic=true
Saludos
Victor (Madrid - Spain)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I has this structure of XML.
<class name="Material" table="material" database="erp">
<attribute name="CodigoMaterial" column="CodigoMaterial" find="true" key="primary"></attribute>
<attribute name="Nombre" column="Nombre"></attribute>
<attribute name="Descripcion" column="Descripcion"></attribute>
<attribute name="StockTotal" column="StockTotal"></attribute>
<attribute name="FamiliaMaterial"></attribute>
<attribute name="ProveedorMateriales"></attribute>
<attribute name="CodigoFamiliaMaterial" column="CodigoFamiliaMaterial"></attribute>
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
</class>
<association fromClass="Material" toClass="FamiliaMaterial" cardinality="oneToOne" target="FamiliaMaterial"
retrieveAutomatic="true" deleteAutomatic="false" saveAutomatic="false" inverse="false">
<entry fromAttribute="CodigoFamiliaMaterial" toAttribute="CodigoFamiliaMaterial" />
</association>
<class name="ProveedorMaterial" table="ProveedorMaterial" database="erp">
<attribute name="CodigoMaterial" column="CodigoMaterial" find="true" key="primary"></attribute>
<attribute name="CodigoProveedor" column="CodigoProveedor" find="true" key="primary"></attribute>
<attribute name="Proveedor"/>
<attribute name="Material"/>
<attribute name="CreatedDate" column="CreatedDate" timestamp="true" />
<attribute name="ModifiedDate" column="ModifiedDate" timestamp="true" />
</class>
<association fromClass="Material" toClass="ProveedorMaterial" cardinality="oneToMany" target="ProveedorMateriales"
retrieveAutomatic="true" deleteAutomatic="false" saveAutomatic="true" inverse="false">
<entry fromAttribute="CodigoMaterial" toAttribute="CodigoMaterial" />
</association>
To save object, all right
but to recovery Material and all proveedorMaterial, i has a problem, don't mistake. I want proveedor Object, but when recovery this property is nothing, but the codigoProveedor is correct. Why I don't recovery tha estructure complete, if i specified in the XML retriveautomatic=true
Saludos
Victor (Madrid - Spain)
Hi Victor,
Your XML setup looks good. I can't see anything obvious that could be a problem.
Could you get the latest version from CVS, try it again, and if it's still a problem do the following:
1. In debug mode, go to the output window and look at the SQL that is generated.
2. Try the SQL directly on your database and see if you get data back.
If that all works, then there is some other problem. If the SQL is wrong, please post it so I can have a look at it.
- Richard.
Hi,
I download a last CVS and it is correct.
What happen with the circular association, if i try recovery a objects.
Thank you.
Circular associations will resolve correctly.
A->B->C->A will also resolve correctly