http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#lifecycle-callbacks

According to the above documentation, it is fine to do this:

/**
 * @PrePersist
 */
public function doStuff()
{
  ...
}

Sometimes, I need a method to be called for multiple lifecycle events. The 
following seems to work, but I'd like to know if it is ok to do or 
considered bad practice and if so, why?

/**
 * @PrePersist
 * @PreUpdate
 */
public function doStuff()
{
  ...
}

I'm using the latest stable release of Doctrine as of this writing.

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to