Is it possible to embed some business logic within hibernate mapping files? Is this a good approach/scalable?
For example, lets say that I want to persist and map the following class in hibernate:
public class Device {
private String id;
public Device(String id) {
this.id = id+"foo";
}
...getID, setID...
}