I'm not entirely certain what you are asking, but while Objectify
doesn't have a special annotation that will turn a field into a
protobuf, you can pretty easily do this yourself with @PostLoad and
@PrePersist lifecycle callbacks:
class MyEntity {
@Transient ComplexThing thing;
byte[] thingBuf;
@PrePersist void onSave() { thingBuf = pbfSerialize(thing); }
@PostLoad void onLoad() { thing = pbfDeserialize(thingBuf); }
}
Jeff
On Thu, Oct 14, 2010 at 3:29 PM, Guillaume B.
<[email protected]> wrote:
> Hello,
>
> I make a basic application that store simple java object using objectify
>
> I also make a spring service that create and return protobuf object
>
> as the protobuf object is nearly the same that the object that I store in
> "big table"
> I wonder if there was a standard way to store protobuf object in the
> datastore
>
> as objectify and JDO use annotation and that I will not anoted generated
> protobuf object
> perhaps someone as a sample / tutorial of the AddressBook protobuf in
> appengine that store object in the datastore
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.