Hello, I think it's not so common. In my project I use protobufs for objects I want to store as serialized fields or in bynary form. That is, I encapsulate protocol buffer building in a wrapper, then store such wrapper in an annotated field of JDO.
@Persistent(Serialized = "true") private MyProtobufWrapper wrapper; MyProtobufWrapper uses protocol buffer Builder in its writeObject / readObject methods and is of course Serializable. OR @Persistent Blob serializedObject; and use a class MyProtobufAdapter which has two methods byte[] convertToSerialized(MyObjet o) and MyObject deserialize(byte[] bytes). I think this is useful if you want to convert data you share with your client code, or if you hit limitations in datastore modeling that you can't work around. And obviously if you don't need to index such data for queries. Otherwise I'll go with regular datastore fields. Regards Lorenzo On Oct 15, 12:29 am, "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.
