[baseten-users] one-to-many relationship strange behavior
Michael Ruepp
michael at ruepp.at
Mon Sep 14 16:25:52 EEST 2009
Hi,
thanks for the reply. I can confirm the bug to be the issue of the not
working relationship. Now everything works as expected.
Mike
_________________
michael ruepp
michael at ruepp.at
fon +41 76 593 04 49
skype michaelruepp
CONFIDENTIALITY NOTICE
This message (including any attachments transmitted with it) contains
confidential information and is intended only for the individual named
herein. If you are not the herein named addressee you should not
disseminate, distribute, copy or otherwise make use of this message.
Please notify the sender immediately by e-mail if you have received
this message by mistake, and delete it from your systems.
On 10.09.2009, at 22:17, Tuukka Norri wrote:
> Hi again!
>
> I made a simple example on using a one-to-many relationship. It's
> available in the repository at http://basetenframework.org/svn/trunk/Examples/OneToManyRelationship/
> I also fixed a bug which might have caused the wrong relationship to
> be used when creating related objects.
>
>> Funny enough, whan I change the Data Model to a many-to-many
>> relationship (Both sides cascade on delete) , I am able to create
>> Projects and ProjectsItems and Selection behavior is as excpected
>> (eg. Select a Project shows the respective ProjectItems created
>> with the Project selected).
> OK, this is a bit strange, since many-to-many relationships should
> require some additional work.
>
>> But when I delete a Project, the respective ProjectItems are not
>> deleted as well, they reside in the Database without relationship.
> Unfortunately, making many-to-many relationships cascade on delete
> isn't especially easy either, because they are implemented with a
> link table. To me, making both sides cascade on delete wouldn't even
> make much sense, since removing one object could very quickly
> cascade to all objects. If you have a use case for this
> functionality, though, we'll definitely consider adding it.
> --
> Best regards,
> Tuukka Norri
> MK&C
>
>
> _______________________________________________
> baseten-users mailing list
> baseten-users at lists.basetenframework.org
> http://lists.basetenframework.org/mailman/listinfo/baseten-users
More information about the baseten-users
mailing list