I'm following the Play Framework 2.0 tutorial for Java and get this error when trying to save an ebean Model (task.save()
).
[PersistenceException: The type [class models.Task] is not a registered entity? If you don't explicitly list the entity classes to use Ebean will search for them in the classpath. If the entity is in a Jar check the ebean.search.jars property in ebean.properties file or check ServerConfig.addJar().]
Check these 3 points :
@Entity
(javax.persistence.Entity)Model
(play.db.ebean.Model)ebean.default="models.*"
(if your classes are in the models package)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With