On Sat, Jan 17, 2009 at 22:57, Wolverine <[email protected]> wrote: > > Wolverine pisze: >> Hello. >> I have a problem with Elixir when trying to delete record from the >> table which is referenced by children objects from the same table. >> I tried to look for solution and I have tried methods described here: >> http://elixir.ematia.de/trac/wiki/SandBox >> Unfortunately none of them works, and honestly Elixir says the are no >> such methods as on_update/on_delete/ondelete/onupdate. I tried every >> one without luck. I have a table called Post. Here is what it looks like: >> > Also one more thing. When I look into phpPgAdmin there is no children > field nor any foreign key with that name for this table. I don't know why.
This is perfectly normal. ManyToOne relationships need a column (with a foreign key) to work, but OneToMany relationship are just reusing that column, not creating one on their own. In SQL terms, they generate stuff like: "select * from post where parent_id = %d". -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
