google-code-export / objectify-appengine

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

Allow alternative means of object creation in Objectify #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be helpful to add an overrideable method to ObjectifyFactory, or allow 
an alternative implementation of an instance factory that EntityMetadata could 
delegate to when creating objects. This would allow third parties to hook into 
the object creation phase when loading from datastore. For example, one may use 
a dependency injection framework to create objects with injected properties. 
This would then allow the enhanced POJO to do things it would otherwise not be 
able to do currently, such as using an injected field in a @PostLoad method.

Original issue reported on code.google.com by milocon...@gmail.com on 30 Aug 2011 at 5:13

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
This is implemented in Objectify4.  Override ObjectifyFactory.construct().  For 
an example of using Guice, see http://www.motomapia.com/

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