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
posted
0
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 ]
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.
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.