• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

which one should I choose?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I work with a application by struts and spring. I do not want to use hibernate as my app is small and hql is so limited. So which r/m should I use?

I need it to map query result to a Object that I defined myself and easy to manage my sql as in hibernate.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I do not want to use hibernate as my app is small and hql is so limited.


What SQL features do you want that are not supplied by HQL? If you are using complex or proprietary SQL its unlikely any ORM tool will provided all the capabilities you need (though of course most of them, Hibernate included, will not stop you running native SQL).
 
xu yuanzhi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are right. But in my application, I think it's unnecessary to use hibernate. My friend suggest ibatis and I try it. Maybe it's ok. And thank you.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


But in my application, I think it's unnecessary to use hibernate


If its unecessary to use Hibernate, why choose iBatis instead?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I use Hibernate in every app I do that needs a database, which is every app I do.

But if it is small, and you need something quick and only queries and simple tables, one to one mapping of classes, then iBatis might be the perfect choice. or use JavaRanch's Jenny http://www.javaranch.com/jenny_beta/jennyFAQ.jsp

Mark
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm typically one to +1 iBatis for most use cases. Even over Hibernate. But depending on how small your app is, iBatis can even be overkill. I'd suggest taking a look at Spring's SimpleJdbcDaoSupport and interfaces like RowMapper. They work very well and if you are already using Spring then shouldn't be anything extra to add.
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the issue with JDBC???
reply
    Bookmark Topic Watch Topic
  • New Topic