[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-753) Hibernate Tools generates ID class with Oracle LONG data type

Dan Madoni (JIRA) noreply at atlassian.com
Mon Sep 11 11:20:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-753?page=comments#action_24404 ] 

Dan Madoni commented on HBX-753:
--------------------------------

In real life, this particular field doesn't really belong in the PK. I have no control over the fact that it's there and little control over the mandate to use Hibernate with this whacky database.

I understand that Hibernate can't make itself responsible for all the world's dopey db designs; however, Hibernate Tools arguably crosses a line from merely providing a framework into translating your schemas into Hibernate artifacts without all that hassle and fuss. If it's the tool's job is to create classes and mappings that the user expects to just...use...then I don't think it's too great an expectation that the Tools should be forgiving in this sense.

It's from that perspective that I thought I'd report this behavior. I won't be too bummed if you disagree with the role of Hibernate Tools as I view it and decide to close this one out.

> Hibernate Tools generates ID class with Oracle LONG data type
> -------------------------------------------------------------
>
>          Key: HBX-753
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-753
>      Project: Hibernate Tools
>         Type: Bug

>   Components: reverse-engineer
>  Environment: Hibernate 3.0, Oracle, Hibernate Tools 3.2 beta 7
>     Reporter: Dan Madoni
>     Priority: Minor

>
>
> If an Oracle table PK includes a LONG data type, Hibernate Tools dutifully generates an ID class that includes that LONG field. Later on when you query with the generated  mapped classes, you get an "illegal use of LONG datatype" error (ORA-00997). This can be particularly frustrating since the typical lazy developer (like me) happily goes off and uses these generated classes, then is bewildered to run into an error in code he didn't create or bother to look at since the nice tool did all the work. :)
> The first thing you're going to say, "what kind of moron includes a LONG data type as a PK anyway?" Suffice to say, such PK's exist and people like me have no say in the matter. So considering that some of us are forced between a rock (some zany db administrator) and a hard place (a requirement to use Hibernate), you can hopefully feel our pain. :)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list