Re: About Question enthuware.oce-jpad.v6.2.510 :
Posted: Sat Feb 25, 2017 4:12 pm
Option 3 doesn't take property access into account.
For example, I was able to get away with this monstrosity:
For example, I was able to get away with this monstrosity:
Code: Select all
@Entity
@Access(AccessType.PROPERTY)
public class Customer {
private Map<String,Object> data = new HashMap<>();
@Id
public Long getId() {
return (Long) data.get("id");
}
public void setId(Long id) {
data.put("id", id);
}
public String getName() {
return (String) data.get("name");
}
public void setName(String name) {
data.put("name", name);
}
}