Bruce Snyder wrote:
The logic from the FieldMolder.getValue() method is correct. What does not
seem to be correct is your receipt of a TransactionNotInProgressException.
This exception is only thrown from within the DatabaseImpl. Please post
the relevant portion of your client code so that I can see the sequence
of events that is causing this to occur.


Now I know what the problem was. Really :-)


This is the mapping:
<class name="no.ebs.best.module.action.ActionProgram" auto-complete="false" identity="ID" key-generator="IDENTITY">
<cache-type type="time-limited" capacity="3600"/>
<map-to table="action_program" xml="action_program"/>
<field name="ID" type="integer" key-generator="identity">
<sql name="action_program_id"/>
<xml node="attribute"/>
</field>
<field name="courseID" type="integer">
<sql name="course_id"/>
<xml node="attribute"/>
</field>
<field name="userID" type="integer">
<sql name="user_id"/>
<xml node="attribute"/>
</field>
<field name="actionItems" collection="collection" type="no.ebs.best.module.action.ActionItem">
<sql many-key="action_program_id"/>
<bind-xml name="action_item"/>
</field>
</class>


<class name="no.ebs.best.module.action.ActionProgramLoader" auto-complete="false" identity="userID courseID">
<cache-type type="time-limited" capacity="3600"/>
<map-to table="action_program"/>
<field name="actionProgram" type="no.ebs.best.module.action.ActionProgram">
<sql name="action_program_id"/>
</field>
<field name="courseID" type="integer" direct="true">
<sql name="course_id"/>
</field>
<field name="userID" type="integer" direct="true">
<sql name="user_id"/>
</field>
</class>



I'm using a loader-object to load the actual type that I really want with another identity-definiton, in this case ActionProgram.


I was calling delete() directly on ActionProgram and not on the loader and this was messing things up, but now that I call delete() on the loader the problem is gone.

What I've tried to solve with the loader is something others would have done differently perhaps, any comments?

Stein

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to