Jes Chergui
Jes Chergui

Reputation: 1318

Play Framework and JPA

testing Play framework and JPA.

I eclipsify my very simple test application. Import the project in eclipse and confirm that the play jar file is in my eclipse java build path: C:\play-2.0.2\repository\local\play\play_2.9.1\2.0.2\jars\play_2.9.1.jar

in my simple Item entity class, I import play.db.jpa.Model which my entity should extend

Here, eclipse is not be able to resolve the class!

Notice, the following jar file DOES NOT include the Model class - which I understand is essential in order to integrate with PLAY with JPA.

play_2.9.1.jar -> play\db\jpa\Model

the jpa only includes the following: TransactionalAction$1.class JPA.class TransactionalAction.class Transactional.class JPAPlugin.class JPA$1.class

what am I missing? do i include a wrong jar in my path? where is Model.class??

Upvotes: 0

Views: 1968

Answers (1)

Jeff LaJoie
Jeff LaJoie

Reputation: 1725

Be sure to import play.db.ebean.*;, Play 2.0 uses Ebean for the Model extension.

Documentation can be found http://www.playframework.org/documentation/2.0.1/JavaEbean

Upvotes: 2

Related Questions