You should use var in stead of val for your properties in MyEntity.
var
val
MyEntity
This is needed to get setters in the underlying java-pojos.