[2.4.3 Java] Ebean and saveManyToManyAssociations

229 views
Skip to first unread message

Slim Slam

unread,
Sep 8, 2015, 1:37:17 PM9/8/15
to play-framework
I guess I don't exactly understand how ebean support has changed
in Play 2.4.x.  I've read the relevant documentation page here:


So, I used to have this:

import play.db.ebean.Model;
...
...
place
.saveManyToManyAssociations("Indiana");

After upgrading to play 2.4.3, and importing
the ebean plugin as described in the docs and
setting the default ebean server, etc,

I get this error msg:

[error] /MyApp/app/controllers/Places.java:141: cannot find symbol
[error]   symbol:   method saveManyToManyAssociations(java.lang.String)
[error]   location: variable place of type models.Place
[error] place.saveManyToManyAssociations


What is the "best practice" way to resolve this?

Slim Slam

unread,
Sep 8, 2015, 4:02:25 PM9/8/15
to play-framework
Oops. I see what to do. Make sure these are in place:

import com.avaje.ebean.Ebean;
import com.avaje.ebean.Model;

Then change the syntax to:

Ebean.saveManyToManyAssociations(place, "Indiana");

Reply all
Reply to author
Forward
0 new messages