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 156062 - Foreign keys subnodes disappear after refreshing
Summary: Foreign keys subnodes disappear after refreshing
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
Reported: 2008-12-25 09:21 UTC by Roman Mostyka
Modified: 2012-06-20 04:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
part1: only use internal name of no real name is provided (1013 bytes, patch)
2012-03-17 22:08 UTC, matthias42
Details | Diff
part 2: Allow refresh of all foreign keys (1002 bytes, patch)
2012-03-17 22:11 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-12-25 09:21:09 UTC
1. Connect to "sakila" MySQL DB.
2. Expand "Tables > films > Foreign Keys > fk_film_language". "language_id -> language.language_id" node should be shown.
3. Rightclick "fk_film_language" node and chosse "Refresh".

Result: "language_id -> language.language_id" node disappears. Why?
Comment 1 Jiri Rechtacek 2009-02-10 15:40:13 UTC
Reassigned to new owner.
Comment 2 matthias42 2012-03-10 17:33:26 UTC
The foreign keys are addressed by an internal name - this is only valid for the lifetime of the parent table. On refresh the whole metadata is refreshed and the internal name of the foreign-key changes.
You'd have to recreate the whole "Foreign key" - node structure, as everything under it depends volatile data. This also means that an ForeignKey Metadata Handle is not stable accross refreshes.
Comment 3 matthias42 2012-03-17 22:08:49 UTC
Created attachment 116823 [details]
part1: only use internal name of no real name is provided
Comment 4 matthias42 2012-03-17 22:11:47 UTC
Created attachment 116824 [details]
part 2: Allow refresh of all foreign keys
Comment 5 Jaroslav Havlin 2012-06-18 14:53:53 UTC
Patches applied as http://hg.netbeans.org/core-main/rev/8019c75d5f27
Thank you.
Comment 6 Quality Engineering 2012-06-20 04:36:06 UTC
Integrated into 'main-golden', will be available in build *201206200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8019c75d5f27
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #156062: Foreign keys subnodes disappear after refreshing