Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Hibernate

Author  Topic 

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-25 : 09:33:30
I know this is not related to SQL server. We are planning to use Hibernate for Java (application cache). Anybody have used it? Ideas.

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2008-07-25 : 10:04:12
We consistently use nHibernate for SQL Server.
It sucks, of course. As do all ORM tools.

e4 d5 xd5 Nf6
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-07-25 : 10:32:36
quote:
Originally posted by blindman

We consistently use nHibernate for SQL Server.
It sucks, of course. As do all ORM tools.

e4 d5 xd5 Nf6



I wholeheartedly concur...

In our company, our application developers have recently started using hibernate. It certainly lets them build code quickly but last month I was staring at an auto-generated table called ImporterPensionPrecedence trying to work out why our application wasn't working. The table had only the following fields.


[pensionSchemeId] INT
[ImporterId] INT
[Precedence] INT


[pensionSchemeId] and [importerId] should have had foreign key constraints but didn't. {pecedence] needed to have a running set of ints from 0 to x for each pensionScheme for each importer. (but didn't).

I fixed the problem eventually with a datafix and then had a chat with the development manager about implementing some foreign keys. He told me that, yes they wanted to, but when they tried adding them hibernate wouldn't function. He said that if we had used PLSQL then it would work.

I'm 90% sure that he's incorrect but, in my limited experience, hibernate seems to let the developers make stuff very quickly and that breaks easily.

-------------
Charlie
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2008-07-25 : 12:27:56
quote:
Originally posted by Transact Charlie

...[pensionSchemeId] and [importerId] should have had foreign key constraints but didn't. {pecedence] needed to have a running set of ints from 0 to x for each pensionScheme for each importer. (but didn't).
Well, of course there is no need for relational integrity in the database. The ORM will take care of that!

quote:
Originally posted by Transact Charlie

...in my limited experience, hibernate seems to let the developers make stuff very quickly and that breaks easily.

What's the standard rule? Software can be developed fast, cheap, or good, but you can only choose two of those three options, right? Well, ORMs allow you to develop fast and cheap.

e4 d5 xd5 Nf6
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-25 : 13:30:38
Thanks for the feedback.I see lots of problems with it for JAVA.

http://www.hibernate.org/9.html
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-25 : 13:37:23
Our Java developers use Hibernate. I absolutely hate what it creates for a schema. Every identity column that they've created is defined as decimal(18,0) instead of int or bigint. I forget what other problems it has, but that's a huge gripe of mine. I'm so sick and tired of seeing those decimal data types in production. And I'm so sick and tired of telling the developers to go through the DBAs for schema review PRIOR TO PRODUCTION!

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-25 : 13:41:37
Thanks Tara for great info. I will take that issue into account in my documentation.
Go to Top of Page
   

- Advertisement -