This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 164803 - Hibernate Problem generating HBM files and Beans
Summary: Hibernate Problem generating HBM files and Beans
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-08 21:46 UTC by pinchhitter
Modified: 2014-07-07 17:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot showing the problem (68.02 KB, image/png)
2009-05-08 21:50 UTC, pinchhitter
Details
file handled correctly (22.32 KB, image/png)
2009-05-08 21:54 UTC, pinchhitter
Details
File handled incorrectly (13.95 KB, image/png)
2009-05-08 21:55 UTC, pinchhitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pinchhitter 2009-05-08 21:46:18 UTC
Hi All,

We are using MySQL running in Windows.  This is an out of the box deployment except for the inclusion of the following 
statement in the my.ini file: lower_case_table_names=2

This allows MySQL to recognize the difference between TABLE and table.  Other than that, MySQL is untouched.

We are using hibernate and the "New Hibernate Mapping Files and POJOs from Database" option to generate the beans and 
the hbm.xml files.  

The problem is that even though every table in the schema has a primary key of type int, not null, unsigned, auto 
increment, when the window that lists the available tables pops up, about 2/3 of the tables in the schema are grayed 
out and have in parenthesis "(no primary key)" as text next to the table name.   

As I mentioned, all of the tables are setup the same way, each having a primary key but for some reason, netbeans 
hibernate tool does not recognize this fact and will not generate beans or hbm files for most of the tables.
Comment 1 pinchhitter 2009-05-08 21:50:35 UTC
Created attachment 81834 [details]
screen shot showing the problem
Comment 2 pinchhitter 2009-05-08 21:54:26 UTC
Created attachment 81835 [details]
file handled correctly
Comment 3 pinchhitter 2009-05-08 21:55:06 UTC
Created attachment 81836 [details]
File handled incorrectly
Comment 4 pinchhitter 2009-05-08 21:56:10 UTC
I have uploaded some screen shots that show the issue and two tables that are virtually identical yet are seen 
differently by the hibernate utility.

Comment 5 Jiri Rechtacek 2009-05-12 10:19:03 UTC
Re-assigning to web/hibernate. If I'm wrong, assign back to db.
Comment 6 Sergey Petrov 2011-03-21 17:45:12 UTC
It's good to have sample sql script to create tables from the issue to evaluate the issue.
Comment 7 Sergey Petrov 2014-07-07 17:56:12 UTC
Can't resolve without sample script/schema