DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Another Hole in Hibernate/JPA

Another Hole in Hibernate/JPA

Rob Williams user avatar by
Rob Williams
·
Sep. 20, 11 · Java Zone · Interview
Like (0)
Save
Tweet
6.60K Views

Join the DZone community and get the full member experience.

Join For Free

The automatic schema update in Hibernate is great. I remember what a nightmare it was to have to constantly tinker with the structure of the domain model, only to then have to then turn around and dither with the database schema before getting the code out. But it‘s been around now for what, 6 years? at least? Everyone knows once you have a system that has data in it, it stops working. Ask yourself the question, why has this lack not been remedied? There are only a few possibilities:

  1. Producer doesn‘t see this as an important requirement.
  2. The ‘good enough‘ argument: basically the producer has decided what is there is enough to have satisfied their obligation.
  3. Producer believes it is important, but there are so many other things that they have just not found the time for it.

JPA is right up there with JSF in terms of the ambition of their release schedule. When it first hit, the biggest gripe you heard was that it didn‘t include criteria queries. They closed that door now in JPA2, but it took what? 5 or 6 years? Again, X.400 was completely inadequate, but a decade of meetings on X.500 resulted in LDAP, and no one ever using it. Wait, this is sounding kind of familiar? Oh yeah, it‘s reminding me of the recent Rod Johnson article about OSGi.. This is, in fact, the OSGi argument. When species make the wrong gamble and put their energy into things that produce nothing, extinction is their reward, in the ‘open‘ community (ironically peopled with a lot of folks who consider themselves libertarians), the reward is ‘we tried, ok, let‘s move on to the next shiny thing.‘

Ruby has a tool called Migrations, Microsoft does replication (but that doesn't address the deploy time requirements). I have talked to a lot of people and read around about what people are doing in the Java world. It's mostly either some stupid process that reminds you of sunday school homework 'put your db changes into an email/attach to a wiki' or some tool that does a bunch of these things in a semi-automated fashion. Some people still use dbUnit to load their data. We used dbDeploy on a project, which did versioning, albeit in a pretty simplistic way. There is a new (to me) player on this front called FlyWay, which looks interesting, but in reading their brags, I was kind of put off by the one that said ‘native SQL, no XML to maintain.‘ What is the point of Hibernate? To not have database specific code anywhere. One thing I like about Flyway, though, is the idea that I can get an instance to a starting state, then save it as a version and go. Of course, if the next client asks for a different db, that image doesn‘t do me squat.

Final point on this front: blubbering with versions and updating things between instances is going to quickly start to look like seriously crazy nonsense in the age of the Cloud where your mom can get things to move without incurring a team of consultants with caissons and ox carts. Object databases don‘t have this problem because you are not translating things from one language to another. And folks, you are not getting much from this 2 language satyr on this front. Clearly, if you make a balance sheet, this stuff appears in the debt column.

 

From http://www.jroller.com/robwilliams/entry/another_hole_in_hibernate_jpa

Database

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Why Performance Projects Fail
  • Implementing RBAC Configuration for Kubernetes Applications
  • How to Leverage Method Chaining To Add Smart Message Routing in Java
  • Ultra-Fast Microservices: When Microstream Meets Payara

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo