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 68842 - The Database Explorer should provide UI for creating foreign keys
Summary: The Database Explorer should provide UI for creating foreign keys
Status: RESOLVED DUPLICATE of bug 69658
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-16 19:59 UTC by William Leonard
Modified: 2012-04-17 18:55 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Leonard 2005-11-16 19:59:59 UTC
The Grab Structure feature doesn't include the table constraints. For example,
if you grab the CUSTOMER_TBL found in the Pointbase Sample database, it will be
missing the following CONSTRAINTS:

CONSTRAINT FK_DISCOUNT_CODE FOREIGN KEY (DISCOUNT_CODE) REFERENCES
DISCOUNT_CODE_TBL(DISCOUNT_CODE),
CONSTRAINT FK_ZIP_CODE FOREIGN KEY (ZIP) REFERENCES MICRO_MARKETS_TBL(ZIP_CODE)
Comment 1 Andrei Badea 2005-12-02 13:30:12 UTC
This is unfortunately as designed. The Database Explorer doesn't provide a means
to create foreign keys, so foreign aren't read or generated by the Grab
Structure action either.

This looks like a high-priority enhancement. Affects for example EJB generation.
When you generate EJBs from a database the relations between them are based on
the foreign keys. If there are no foreign keys there won't be any CMR fields in
the beans and no methods for obtaining the related beans.
Comment 2 Jiri Rechtacek 2009-10-16 14:05:50 UTC
Reassigned to new owner.
Comment 3 matthias42 2012-04-17 18:55:12 UTC

*** This bug has been marked as a duplicate of bug 69658 ***