Ésta es la entidad que contiene el tipo de burbuja:¿Cómo usar blob con ebean & play 2?
@Entity
@Table(name="image_info")
public class ImageInfo extends Model {
.......
@Constraints.Required
private Blob image;
.......
}
$ juegan -DapplyEvolutions.default = true plazo
yo nos errores como los siguientes:
[warn] c.j.b.ConnectionPartition - BoneCP detected an unclosed connection and will now attempt to close it for you. You should be closing this connection in your application - enable connectionWatch for additional debugging assistance.
[error] c.a.e.s.t.r.ImmutableMetaFactory - Was unable to use reflection to find a constructor and appropriate getters forimmutable type interface java.sql.Blob. The errors while looking for the getter methods follow:
[error] c.a.e.s.d.p.DeployCreateProperties - Error with models.ImageInfo field:image
java.lang.RuntimeException: Unable to use reflection to build ImmutableMeta for interface java.sql.Blob. Associated Errors trying to find a constructor and getter methods have been logged
at com.avaje.ebeaninternal.server.type.reflect.ImmutableMetaFactory.createImmutableMeta(ImmutableMetaFactory.java:71) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.type.DefaultTypeManager.recursiveCreateScalarTypes(DefaultTypeManager.java:227) ~[ebean.jar:na]
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProp(DeployCreateProperties.java:357) [ebean.jar:na]
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProp(DeployCreateProperties.java:377) [ebean.jar:na]
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProperties(DeployCreateProperties.java:168) [ebean.jar:na]
at com.avaje.ebeaninternal.server.deploy.parse.DeployCreateProperties.createProperties(DeployCreateProperties.java:94) [ebean.jar:na]
¿Cómo pude hacer el cambio para que el tipo de blob pueda ser reconocido?
Gracias. Tengo un error en Heroku que dice 'ERROR: type' blob 'no existe'. Intenté usar 'play run' en mi local, funciona. Pero no Heroku. – angelokh
Heroku usa Postgres de manera predeterminada y probablemente estés desarrollando localy con MySQL (nota: estoy tratando de adivinar). Postgres [no admite blob] (http://www.postgresql.org/docs/current/interactive/datatype-binary.html) – biesior