Hi,
I was using the n:m mapping (or dubble 1:n) when i noticed that my "mapping"
class or item was not inserted in the database.
Every time i stored an "mapping" item/class the foreign key's did not
update. As a last resort I changed the foreign keys in the
mapping class from Integers to int's and the item was correctly inserted...
Is it a small bug?
Greetz Bram
ps,
i like to use Integers, it is a "better" representation of the INTEGER db
colomn, stuff to do with null's, null -> null, 0 -> Integer(0)
class Schema {
Integer id;
String name;
}
class SchemaRelation {
private Integer parentSchemaFkId= null;
private Integer schemaIdFk = null;
Schema parentSchema;
Schema schemaFkId;
}
with a mapping file:
<class-descriptor class="Schema" table="wf_schema">
<field-descriptor id="1" name="id" column="schema_id"
jdbc-type="INTEGER" primarykey="true" autoincrement="true" />
<field-descriptor id="2" name="name" column="schema_name"
jdbc-type="VARCHAR" length="50" nullable="false" />
</class-descriptor>
<class-descriptor class="SchemaRelation" table="wf_parent_schema">
<field-descriptor id="1" name="parentSchemaFkId"
column="parent_schema_id" jdbc-type="INTEGER" primarykey="true"/>
<field-descriptor id="2" name="schemaFkId" column="schema_id"
jdbc-type="INTEGER" primarykey="true"/>
<reference-descriptor name="parentSchema" class-ref="Schema">
<foreignkey field-id-ref="1"/>
</reference-descriptor>
<reference-descriptor name="schema" class-ref="Schema">
<foreignkey field-id-ref="2"/>
</reference-descriptor>
</class-descriptor>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>