Paul Clapham wrote:It seems unlikely to me that if Hibernate gave you a Customer record, and you updated the customer's credit limit but nothing else, because you wanted to leave all of the other columns unchanged, then Hibernate would set all of the other columns to null. I think you may have had something else in mind when you said "insert null" but I can't quite tell what it was.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:I recommend that you budget some resources towards modernization before that breaks. Software does NOT "live forever", despite what Management thinks. It rots primarily from the outside in as hardware, operating systems, and ultimately language environments and support libraries change around it. Those changes not only add up, they snowball. It's known as "technical debt" and just because it's not the kind of debt that a Bean Counter can put on a spreadsheet doesn't mean it's not very, very expensive.
The fact that you're using XML files makes me fairly certain that you are using Legacy Hibernate. Hibernate is presently available in 2 forms: legacy form, and Java Persistence Architecture (JPA) form. Someday the legacy form is no longer going to be supported and even now, the number of experts in it is fairly low.
JPA, on the other hand, is part of the JEE EJB3 specification and you can expect much better support over a longer period. It is relatively easy to convert from legacy Hibernate to JPA Hibernate, but the sooner done, the easier/cheaper it will be. JPA, incidentally, was shaped in large part by people from the Hibernate team, which is one reason why it's fairly simple to convert.
Incidentally, the XML files still work, although you will probably see differences between the Legacy and JPA Hibernate XML formats. It's better to use annotations, though, as it reduces the number and complexity of XML files. The XML is then used to override the annotations when special needs arise.
Consider Paul's rocket mass heater. |