2009/5/13 FlyLM [ML] <flylm...@gmail.com>:
> Hello,
>
> I use Admin Generator to allow Admin users to update the local part of
> an object.
>
> The shema's object is defined like below :
>
> ubCgu:
>    actAs:
>     Timestampable: ~
>     I18N:
>      fields: [content]
>      className: %CLASS%I18n
>    columns:
>      country_iso: { type:string(2), notnull:true }
>      label: { type:string(64), notnull:true }
>      content: { type:string, notnull:true }
>    relations:
>      ubCountry: { onDelete: CASCADE, local:country_iso, foreign: iso }
>
> When the user updates only the localized data (column named
> "content"), the "Timestampable" column named "updated_at" is not
> updated.
>
> Is it normal ??

I changed my schema to solve my problem. I set a "Timestampable" behavior on
the I18N fields.

ubCgu:
    actAs:
     I18N:
      fields: [content]
      actAs:
        Timestampable: ~
      className: %CLASS%I18n
    columns:
      country_iso: { type:string(2), notnull:true }
      label: { type:string(64), notnull:true }
      content: { type:string, notnull:true }
    relations:
      ubCountry: { onDelete: CASCADE, local:country_iso, foreign: iso }

>
> If the user modifies a column of the main table,  for example the
> column named "label", the "Timestampable" column named "updated_at" is
> well updated.
>
> Thx
> Fabien
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to