Hy! 
As you can see I'am porting my application from OJB 0.9.7 to OJB 1.0
Before when i had reference-descriptor (1:1 mapping) on Object and I try
to save this object without creating the reference object there is no problems
but now with OJB 1.0 when I try to do the same thing my referenc field 
(Foreing key) is set to null and i get error CANNOT INSERT NULL. If i create 
reference object just with Primary key then everything passes OK.

EXAMLPLE
<class-descriptor class="split.model.obrazci.Bmg21" table="MG21">
    <field-descriptor name="mg21_xx" column="MG21_XX" jdbc-type="INTEGER" 
primarykey="true"/>
    <field-descriptor name="mg21_id" column="MG21_ID" jdbc-type="VARCHAR"/>
    <field-descriptor name="mg21_str" column="MG21_STR" jdbc-type="VARCHAR"/>
    <field-descriptor name="mg21_stat" column="MG21_STAT" jdbc-type="INTEGER"/>
    <field-descriptor name="mg21_user" column="MG21_USER" jdbc-type="VARCHAR"/>
    <reference-descriptor name="mt05" class-ref="split.model.items.Bmt05" >
        <foreignkey field-ref="mg21_id" />
    </reference-descriptor>

If I create Bmg21 without creating Bmt05 and try to store() I get an ERROR

but if I create Bmg21 an create Bmt05 and setMt05_id(mg21_id) than it passes 
OK.

What's the problem!


Thanks,
Jure


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to