asolfre / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

Lifecycle callbacks (e.g. @PrePersist) not called on @Embedded classes #104

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a class with @PrePersist or @PostLoad annotated method
2. Create another class and add a member of type of the first class. Annotate 
Member @Embedded
3. fill member values and persist outer class (the one defined in step 2)

What is the expected output? What do you see instead?
Lifecycle methods are called in the embedded class

What version of the product are you using? On what operating system?
3.0

Please provide any additional information below.
This would be very useful to work around the fact that AppEngine does not 
support Maps, for instance. I am implementing my own map that simply dumps its 
contents into one or 2 sorted lists before saving and repopulates the contained 
HashMap upload loading from the datastore.

Original issue reported on code.google.com by DanielVo...@gmail.com on 31 Aug 2011 at 10:46

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 31 Aug 2011 at 10:48

GoogleCodeExporter commented 9 years ago
Objectify4 supports maps in two ways:  either a Map<String, XYZ> which creates 
expando-style fields, or you can automatically convert any collection type 
(say, embedded objects) to a map using @Mapify(YourKeyMapper.class).

That said, this feature request is acknowledged.

Original comment by lhori...@gmail.com on 16 Dec 2011 at 2:44

GoogleCodeExporter commented 9 years ago
Lifecycle callbacks now work on embedded classes in v5

Original comment by lhori...@gmail.com on 14 Apr 2014 at 12:25