I think...

Field(...,'reference something',ondelete='ignore')

I am not sure whether this change will trigger a migration of not.
Give it a try.
You may have to reset the database.
Please let us know if this solved the problem.

On Aug 16, 4:06 am, TomPliss <tompl...@gmail.com> wrote:
> Hey guys,
>
> (newbie here)
>
> I'm working on a batabase, with many one2many relationship.
> exemple :
> "labs" have "equipments", which have "devices".
> and "contracts" have "equipments" too (as they are maintenance
> contracts).
>
> the problem is : if I delete a contract, every equipments which refers
> to it is deleted.
>
> I'd like to turn this off (isn't there an option for this in the
> database-model definition ?)...
>
> Thanks,
> tom.
>
> PS: i'm a little frenchy noob,
> please forgive my english, and state the obvious ;)

Reply via email to