0
votes

Although I know there is already a Blob service for Appengine, I want to experiment on storing big blobs within the datastore.

Basically I am trying to persist this object using Objectify:

BigBlob.java

BigBlobFragments.java

However, appengine is complaining that: "BigBlobFragment is not a supported property type"

For the BigBlob type I created a DAO class with CRUD operation and registed the type like this:

static {
    ObjectifyService.register(BigBlob.class);
    //ObjectifyService.register(BigBlobFragment.class);
}

protected BigblobDaoImpl() {
    super(BigBlob.class);
}

I actually also have tried registering BigBlobFragment.

Hopefully someone can share some ideas on how to actually persist Big blobs and fragments using Objectify.

2

2 Answers

0
votes

I have not used Blobs myself but I noticed you have @PersistenceCapable above your entities... that should be @Entity.

import com.googlecode.objectify.annotation.Entity;

Then you should be able to register your entity with Objectify.

ObjectifyService.register(BigBlob.class);
0
votes

You need to register both the BigBlob and the BigBlobFragment and replace all of your JDO annotations with Objectify annotations (assuming you are using ofy4. You might also want to consider embedding the BigBlobFragment object inside of the BigBlob for performance using @Embed.