Re: [Modeling-users] slooow delete
Status: Abandoned
Brought to you by:
sbigaret
|
From: John L. <jl...@gm...> - 2005-03-10 16:20:54
|
On 10 Mar 2005 15:10:59 +0100, Sebastien Bigaret
<sbi...@us...> wrote:
>
> I'd like to understand why so many objects are fetched (is there, by any
> chance, a to-many relationships without an inverse relationship defined
> pointing back to the object?)
I'm pretty certain there isn't; this is the entity I'm deleting (sans
the non-relationship properties):
Entity ('Task',
properties= [
RToOne ('need', 'Need', joinSemantic=2, inverse='tasks'),
RToOne ('team', 'Team', joinSemantic=2, inverse='tasks'),
RToOne ('mealType', 'MealType', joinSemantic=2,
inverse='tasks'),
],
),
the weird thing is that the entities it loads are all Tasks, the same
thing (a whole load of Tasks getting loaded) happens upon insert; what
triggers it in that case is
team.addToTasks(task)
whereas on the previous line I have a
need.addToTasks(task)
and that doesn't trigger it.
Here are the Relationships defined in both Need and Team:
Entity ('Team',
properties= [
RToOne ('offer', 'Offer', joinSemantic=2, inverse='teams'),
RToMany ('tasks', 'Task', inverse='team'),
RToMany ('userTeams', 'UserTeam', inverse='team'),
],
),
Entity ('Need',
properties= [
RToOne ('category', 'Category', joinSemantic=2,
inverse='needs'),
RToOne ('sponsor', 'User', joinSemantic=2, inverse='needers'),
RToOne ('offer', 'Offer', joinSemantic=2, inverse='needs'),
RToOne ('user', 'User', joinSemantic=2, inverse='needs'),
RToOne ('visibility', 'Visibility', joinSemantic=2,
inverse='needs'),
RToMany ('tasks', 'Task', inverse='need'),
],
),
--
John Lenton (jl...@gm...) -- Random fortune:
Don't anthropomorphise computers and cars, They hate that.
|