I figured it out. I had another issues in my schema that was causing the
build to fail, so i was using the existing sql when i reloaded the db.
Ant Cunningham wrote:
> It seems Im doing something incorrectly in my schema definition.
> Considering the following snippets:
>
> inventory_home:
> id:
> subdivision_id: {type: integer, foreignKey: true, foreignTable:
> subdivision, foreignReference: id, onDelete: setnull}
>
> subdivision:
> id:
>
> With this set up i cannot delete a Subdivision unless i first delete all
> InventoryHomes linked to it. What i want to happen is for the
> InventoryHome to get a null SubdivisionId when its linked Subdivision is
> deleted.
>
> What am I doing wrong?
>
> Furthermore, if i want The InventoryHome to be deleted when its linked
> Subdivision is deleted i would assume it would look something like this:
>
> inventory_home:
> id:
> subdivision_id: {type: integer, primaryKey: true, foreignKey: true,
> foreignTable: subdivision, foreignReference: id, onDelete: cascade}
>
> subdivision:
> id:
>
> That doesnt seem to work either. I've looked at both the Propel and
> Symfony documentation as well as this:
> http://symforc.com/post/2008/07/10/Foreign-keys-onDelete-for-dummies but
> they are all somewhat sparse on the subject. Could someone point out
> what I'm doing wrong?
>
> FYI Symfony 1.1, Propel 1.2.
>
> Thanks!
>
>
--
Ant Cunningham
Graphic Designer | Web Developer
Vector Based Design
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---