I am trying to create a play 2.3.4 application with Spring Data JPA. This tutorial says it is good practice to let my model class inherit from play.db.jpa.Model
. Therefore I added import play.db.jpa.*
to my code and let my model class to extend from Model
, However, when I reloaded the application, I got an error message, that Model
is an unknown symbol. Anybody
knows how to inherit from Model
?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
play.db.jpa.Model
does not exists in Play2 (there is only a Model class for Ebean ORM). So dont extend that class. In fact for what I can tell, even on Ebean, extending it does not bring any improvement.Also check that you have in your
libraryDependencies
(build.sbt file) the following entries(you can replace the second with a different implementation/version if you need). After that you can run
activator update
in the terminal.Using Play1 instructions in Play2 will not work in many cases. Play1 and Play2 are two very different frameworks. The page you are looking for is probably this.