On 06-07-2010 at 23:40, Nikolaos Giannopoulos wrote: > It's unfortunate though that the initialization has to be > considered in 2 places i.e. for each attribute to initialize... once > in the getter... and then again to ensure the getter is called in > the @PrePersist and @PreUpdate method. Also if you have a subclass > heirarchy you will need to ensure that the @PrePersist and > @PreUpdate methods also call super.preSave() (or whatever the method > was called) as JPA at least when implemented with Hibernate appears > to not call the same method annotated with @PrePersist and > @PreUpdate in a super class (haven't tested if naming the methods > differently would make them all get called in the heirarchy).
This is unfortunate, as (IIRC) the spec says _all_ event handlers must be called: there may be more than one. But then again, I may be confused with JPA2, as that is what I'm working with lately. Oscar -- ,-_ Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/ /() ) (__ ( Simplicity is prerequisite for reliability. =/ () -- Edsger Dijkstra, EWD498
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users