Alter entity before saving ?

23 views
Skip to first unread message

Nicolas

unread,
Jan 10, 2013, 7:42:25 AM1/10/13
to pommp...@googlegroups.com
Hello,

Before save an entity, I would like alter it (remove the empty array
items). Where can I do that ?

Best regards,
Nicolas.

Grégoire Hubert

unread,
Jan 11, 2013, 3:59:08 AM1/11/13
to pommp...@googlegroups.com
Le jeudi 10 janvier 2013 13:42:25 UTC+1, Nicolas a écrit :
Hello,

Before save an entity, I would like alter it (remove the empty array
items). Where can I do that ?


Hi Nicolas,

In the corresponding Map class, you could overload the `saveOne()` method. Do the alteration you want and then call the parent method.

Cheers, 
Grégoire

Nicolas

unread,
Jan 11, 2013, 9:10:14 AM1/11/13
to pommp...@googlegroups.com
Le 11/01/13 à 00:59, Grégoire Hubert a écrit :
> In the corresponding Map class, you could overload the `saveOne()` method.
> Do the alteration you want and then call the parent method.


Simply… I loocked about type conversion and accessor overriding.

Thank you.
signature.asc
Reply all
Reply to author
Forward
0 new messages