Any ideas on this? I tried implementing all my transactin in ODMG and had the same problem...

Thanks
-Clay

Clay Mitchell wrote:

Ok, maybe I don't understand exactly how this all works, but here is what's going on.

I've posted the 3 relevant class-descriptors below. There are two source tables (ACCOUNT and SECURITY) and one that links the two (ACCOUNT_SECURITY).

The initial load of an object works perfectly. All references are loaded perfectly, even cascading through dozens of tables.

I create a new object / array representing ACCOUNT_SECURITY, populating the accountId and securityId fields, and then add it to the account object. I don't populate the SECURITY object. And then I store that account.

New ACCOUNT_SECURITY entries work great, no problem with inserts. Here's where the problem starts:

1) Removing ACCOUNT_SECURITY entries that don't exist doesn't happen.
2) When I try to reload the account object, it stores the exact copy I stored, (I'm assuming the cache is taking over) while I need it to reload the entire object. Can I force this without turning off caching?


Here's the three entries in my repository:

<class-descriptor class="com.exigentic.swls.AccountSecurity" table="ACCOUNT_SECURITY">
<field-descriptor name="securityId" indexed="true" primarykey="true" default-fetch="true" column="SECURITY_ID" jdbc-type="INTEGER"/>
<field-descriptor name="accountId" indexed="true" primarykey="true" default-fetch="true" column="ACCOUNT_ID" jdbc-type="INTEGER"/>
<reference-descriptor name="security" class-ref="com.exigentic.swls.Security" auto-update="false" auto-delete="false">
<foreignkey field-ref="securityId"/>
</reference-descriptor>
<reference-descriptor name="account" class-ref="com.exigentic.swls.Account" auto-update="false" auto-delete="false">
<foreignkey field-ref="accountId"/>
</reference-descriptor>
</class-descriptor>


<class-descriptor class="com.exigentic.swls.Security" table="SECURITY">
<field-descriptor name="id" primarykey="true" default-fetch="true" autoincrement="true" sequence-name="SEQ_SECURITY_ID" column="SECURITY_ID" jdbc-type="INTEGER"/>
<collection-descriptor name="accountSecurities" element-class-ref="com.exigentic.swls.AccountSecurity" auto-update="false" auto-delete="false">
<inverse-foreignkey field-ref="securityId"/>
</collection-descriptor>
</class-descriptor>


<class-descriptor class="com.exigentic.swls.Account" table="ACCOUNT">
<field-descriptor name="id" indexed="true" primarykey="true" default-fetch="true" autoincrement="true" sequence-name="SEQ_ACCOUNT_ID" column="ACCOUNT_ID" jdbc-type="INTEGER"/>
<collection-descriptor name="security" element-class-ref="com.exigentic.swls.AccountSecurity" auto-update="true" auto-delete="true">
<inverse-foreignkey field-ref="accountId"/>
</collection-descriptor>
</class-descriptor>


Thanks,
-Clay Mitchell

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





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



Reply via email to