The moose likes Object Relational Mapping and the fly likes Client Side ORM tool ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Client Side ORM tool ? " Watch "Client Side ORM tool ? " New topic
Author

Client Side ORM tool ?

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Hi Guys : Im an avid hibernate user, but Im writing a swing application, and I find that the cache, session, and all the other nonsense gets in the way. is there an orm tool that has been optimized for client side apps ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32765
What do you mean by "gets in the way"? Does it introduce performance bottlenecks? Also, optimized in which way?
[ May 18, 2007: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Well, I feel like the whole "session" thing in hibernate is overkill for my purposes. I dont need/want a session, or anything analagous to it. I want 100% concurrency with the database at all times. Ive found that hibernate can easily allow you to "save" an object, without actually writing it to the database, and then it will complain when you "flush" the object, unless you restart the "session" and retry.

I dont want to deal with that stuff, I just want a tool that will save an object by inserting it and retriving its auto generated key, and then simply allow me to update that object in the database using an object oriented API. This is what most home grown JDBC apps do, and I wonder why there is no ORM tool that follows this approach.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Well, I feel like the whole "session" thing in hibernate is overkill for my purposes. I dont need/want a session, or anything analagous to it

Why don't you use a DAO pattern that opens and closes a Session for each operation? Its as good as gone if you do that.


I want 100% concurrency with the database at all times

That is not a realistic aim unless your database is a single user database, regardless of whether or not you use an ORM tool.


Ive found that hibernate can easily allow you to "save" an object, without actually writing it to the database, and then it will complain when you "flush" the object, unless you restart the "session" and retry

Sounds like your persistance logic is possible incorrect. Can you show us your code that exhibits this? Perhaps someone can spot where you are going wrong.


I dont want to deal with that stuff, I just want a tool that will save an object by inserting it and retriving its auto generated key, and then simply allow me to update that object in the database using an object oriented API. This is what most home grown JDBC apps do, and I wonder why there is no ORM tool that follows this approach.

The approach is very basic. There is not much value in an ORM tool that just does these things. However you can use most ORM tools in this way.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
 
subject: Client Side ORM tool ?
 
Threads others viewed
How to create Client side stubs and Plan descriptors using weblogic
unsaved-value
Mapping Tables
How to detect javascript is enabled or not?
Session Tracking
developer file tools