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 55241 - rename dbschema does not work
Summary: rename dbschema does not work
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 4.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-02-18 23:13 UTC by jielin
Modified: 2008-08-07 12:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jielin 2005-02-18 23:13:59 UTC
Rename dbschema does not work.
rename the current dbschema to a new name.
When trying to expand the dbschema node, the node
marks as Error.
restart netbeans, the error is still there.
Comment 1 jielin 2005-02-18 23:44:22 UTC
Rename the current dbschema to a new name. recapture the dbschema with
the old name. The old dbschema has error. the newly created dbschema
is ok. When open sun-cmp-mappings.xml, the mapping is not working. the
mappings table has red x. 
Comment 2 _ ludo 2005-03-02 00:37:52 UTC
So far, I cannot reproduce it... So timing issue?
Comment 3 Rochelle Raccah 2005-03-04 20:32:19 UTC
I can reproduce it.  I think it depends on whether you have looked at
that schema in a context where it did work (like the mapping) in that
IDE session, or whether the node expansion is the first time you try
to access its content.
Comment 4 Petr Blaha 2006-03-13 13:32:22 UTC
TM 5.0 -> TBD
Comment 5 Andrei Badea 2006-05-29 11:52:27 UTC
I can't reproduce it. Can someone post reproducible steps from a clean userdir?
Could the problem be that the .dbschema file is renamed, but the name of the
schema (as returned by SchemaElementImpl.getName()) is not modified accordingly?
Comment 6 Rochelle Raccah 2006-06-09 01:22:02 UTC
I couldn't reproduce the exact problem (Jielin, can you also try?), but this is
a related problem with steps:

1) new EJB module project
	manage servers to add GF
	J2EE 1.4
2) new persistence->db schema
	name: newSchema
	pick src/conf
	derby connection
	all tables
	finish
3) quit & restart IDE (not sure if this step is required)
4) expand conf files in project view, select newSchema.dbschema
	right-click, rename to newSchema1
5) expand the newSchema1 node until you see tables, then collapse the node so
you only see the dbschema node
6) repeat step 2, but only choose one table
7) now try to open both dbschema nodes and you'll see the same set of tables --
clearly wrong

You're correct in thinking that it has something to do with the cached value of
the schema name.
Comment 7 David Vancouvering 2008-01-09 23:05:39 UTC
Rochelle, this is a very old bug.  Is it still an issue, or can we close it?

Thanks,

David
Comment 8 David Vancouvering 2008-01-09 23:05:58 UTC
Waiting to hear back from Rochelle
Comment 9 Rochelle Raccah 2008-01-09 23:09:22 UTC
I believe it is still a problem.
Comment 10 Andrei Badea 2008-08-07 12:10:12 UTC
An unreproducible race condition with low impact (no duplicates since 4.1). Not worth spending time on it. Sorry.