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 90962 - Join tables candidates whose foreign keys are unique should not be considered join tables
Summary: Join tables candidates whose foreign keys are unique should not be considered...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
: 90520 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-12 14:17 UTC by Andrei Badea
Modified: 2007-02-15 15:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Database schema (241 bytes, text/plain)
2007-01-07 13:23 UTC, Andrei Badea
Details
NPE in JavaPersistenceGenerator (1.86 KB, text/plain)
2007-01-07 13:24 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Andrei Badea 2007-01-07 13:22:01 UTC
Fixed the unique key part, but now the generation fails because of a NPE in
JavaPersistenceGenerator.

Checking in
src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java;
/cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java,v
 <--  DbSchemaEjbGenerator.java
new revision: 1.4; previous revision: 1.3
done
Comment 2 Andrei Badea 2007-01-07 13:23:58 UTC
Created attachment 37113 [details]
Database schema
Comment 3 Andrei Badea 2007-01-07 13:24:43 UTC
Created attachment 37114 [details]
NPE in JavaPersistenceGenerator
Comment 4 Andrei Badea 2007-01-08 15:34:41 UTC
Improved the fix by ignoring a primary key containing all join foreign keys and
simplified the code:

http://j2ee.netbeans.org/source/browse/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java?r1=1.4&r2=1.5
Comment 5 Andrei Badea 2007-01-08 16:17:06 UTC
The NPE in desc2 is not related to this issue, so I filed issue 92031 for it and
I'm closing this one.
Comment 6 Andrei Badea 2007-02-15 15:05:23 UTC
*** Issue 90520 has been marked as a duplicate of this issue. ***