1. What's the right programming pattern when using Hibernate? Hibernate doesn't want developers to be aware of persistence until the last minute. It means developers use Java objects as if there's no such thing as persistence. When we need to persist the object to some storage, we tell Hibernate how to do by providing a XML file.
2. Does that mean if we have 100 value objects, we need 100 OR mapping XML files? If so, we don't want to maintain both Java value object and Hibernate XML file. The value objects are the only source files we want to maintain. We may want to use similar techniques like XDoclet or annotation in EJB 3.0.
|