l-2msw
Last Updated: February 25, 2016
·
1.049K
· drabiter
Dsc 0105 0

A successful update on Play! models

A a = A.find.byId(id);
a.field = newValue;
a.update();

If you use Ebean, it may won't work. Why? dunno. It seems Play! can fail the getter/setter creation magic. Although you already have 'field' as public member, try write your own getter/setter (Yeah, even for public fields! crazy!)

A a = A.find.byId(id);
a.setField(newValue);
a.update();

Savior.

Say Thanks
Respond