Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transparency

 
Maxim Katcharov
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a persistance framework out there that's more or less completely transparent? Yes, Hibernate, but not quite. It beats out most other technologies in terms of not being seen, but it's not fully transparent. I don't mind the intrusion of an identifier and all that, that's not what I'm getting at.

1:X | 2:Model | 3 ersistance

In Hibernate, as with everything else it seems, the objects really reside on #3. The model that you work with is not the 'real' model, and your code knows this. True transarency, to me, would be the model classes, some special collection of them (that's all, nothing more), and forcefully restarting will yield the model objects just as they were.

Here's a naive idea: say you have a new Cat(), other cats, and a big special collection of cats. allCats.add(newCat) (or someCat.setParent(newCat)) will persist said cat, and as you'd expect, losing the cat as a referance and then removing it from the collection will mean the cat is no more.

Does something like this exist, and what are your thoughts on the matter?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!