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();
Written by Hendra Gunawan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Hibernate
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#