2010/1/25 Olivier LOYNET <olivierloy...@gmail.com>:
> Hi,
>
> I've two tables :
>  - "Profile" table
>  - "Organism" table with an embedded relation (1,1)
> The "Profile" table have Timestampable behaviour like this schema :
>
> Profile:
>  tableName: profile
>  actAs:
>    Timestampable:   ~
>  columns:
>    id:
>      type:          integer(4)
>      primary:       true
>      autoincrement: true
>    name:
>      type:          string(255)
>      notnull:       true
>
> Organism:
>  tableName: organism
>  columns:
>    id:
>      type:          integer(4)
>      primary:       true
>      autoincrement: true
>    profile_id:
>      type:          integer(4)
>      notnull:       true
>    name:
>      type:          string(255)
>      notnull:       true
>  relations:
>    Profile:
>      local:         profile_id
>      foreign:       id
>      foreignType:   one
>
>
> My problem is :
>
> If I only update some information in "Organism" table, the updated_at column
> is not modified. It's normal because the behavior don't detect any modified
> value in "Profile" table.
>
> How to mention to the "Profile" table that some data have change and to
> update the column "updated_at" with the current value.
>
> What is the best method ? Is by extending the doctrine events ? To put some
> code in doSave or else ? Another ?
>

Hi,

Perhaps it's not the best method, but you can use the method
"postUpdate" of the Doctrine model class of "Organism" to update the
"Profile".

Fabien


>
> Regards,
> Olivier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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