I'm new to play framework, Ebean, and ORMs in general and I have a question regarding updating fields of a persisted object.
I know that in hibernate when you call the set method of an object, it will automatically call the update method to update in the db. Does Ebean work similarly? With play framework, from what i've read, the getters and setters are generated automatically when the fields are made public. Say I have the following class in my play project:
@Entity
public class Foo extends Model{
public String bar;
}
public static void main(String a[]){
Foo f = new Foo();
f.bar = "foobar";
}
My question has 2 parts:
1) does the assignment f.bar="foobar"; recompile into calling f.setBar("foobar"); within play?
2) And if so, will this assignment automatically call the model's upadte method or do i need to explicitly make update methods for updating each field?
Thanks for the assistance :)