Stephen,

can you please supply us with a Junit test case that allows us to reply
the complete problem. I think creating a Jira issue and attaching all
relevant artefacts is a good way to go forward.

Werner

Stephen Ince wrote:
> It looks like castor caches dependent objects event if you tell it no-cache.
> Is there a way to to tell castor not to cache dependent objects?
> I want the parent object cached but not the dependent object.
> I have a cascade delete referential integrity constraint that deletes the 
> dependent object.
> 
> Here is may mapping file. Any help on this would be greatly appreciated.
> 
> // parent object
> <class name="com.opendemand.jdo.UserScenario" auto-complete="false" 
> identity="userScenarioId" key-generator="keygen">
> <description>Default mapping for class 
> com.opendemand.jdo.UserScenario</description>
> <map-to table="user_scenario"/>
> :
> <field name="userScenarioRelations" 
> type="com.opendemand.jdo.UserScenarioRelation" collection="collection" 
> lazy="true">
> <sql many-key="user_scenario_id" dirty="ignore" />
> </field>
> </class>
> 
> 
> // dependent object
> <class name="com.opendemand.jdo.UserScenarioRelation" auto-complete="false" 
> identity="id" key-generator="keygen" 
> depends="com.opendemand.jdo.UserScenario" >
> <map-to table="user_scenario_relation" />
> <cache-type type="none" />
> <field name="id" type="integer" required="true" >
> <sql name="id" />
> </field>
> <field name="userScenario" type="com.opendemand.jdo.UserScenario" 
> required="true" >
> <sql name="user_scenario_id" />
> </field>
> <field name="childUserScenario" type="com.opendemand.jdo.UserScenario">
> <sql name="child_user_scenario_id" />
> </field>
> </class>
> 
> Database schema.
> -------------------------------
> create table user_scenario_relation (
> id int not null primary key generated by default as identity,
> user_scenario_id int not null,
> -- null child_user_scenario_is is a reference to itself
> child_user_scenario_id int,
> :
> FOREIGN KEY (user_scenario_id) REFERENCES user_scenario ON DELETE CASCADE,
> FOREIGN KEY (child_user_scenario_id) REFERENCES user_scenario 
> (user_scenario_id) ON DELETE CASCADE
> );
> 
> Steve


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to