Hi Callum,
You may want to set a "delete rule" for [team -> league] relationship to
"NULLIFY":
http://objectstyle.org/cayenne/modelerguide/modeling-object-layer/delete-rules.html
Otherwise a deleted team object will still be present in the league teams
list (deleted oject will become "transient" on commit, but the object
itself will still be around).
Hope this helps.
Andrus
> Hello
>
> I hope someone can show me what I am doing wrong....
>
> I have a class that finds a specific team within a league and then
> deletes the team. The team (and all the relationships) are deleted in
> the database (MySQL 4) - I can go & have a look and all is as expected.
> The problem is that when I run a query on the league to find all the
> teams that are in it, the team that has been deleted still comes up in
> the list. If I shut the browser down and start it back up again, the
> List leagues =
> ctxt.performQuery(query); returns what is actually in the database, i.e.
> the desired result.
>
This archive was generated by hypermail 2.0.0 : Thu Nov 04 2004 - 09:34:43 EST