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 156920 - "recapture schema from database" doesn't see changes
Summary: "recapture schema from database" doesn't see changes
Status: VERIFIED INCOMPLETE
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 161679 (view as bug list)
Depends on:
Blocks: 161679
  Show dependency tree
 
Reported: 2009-01-15 21:27 UTC by gholmer
Modified: 2010-12-13 12:40 UTC (History)
2 users (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 gholmer 2009-01-15 21:27:34 UTC
I made extensive changes to my database after creating an EJB project (within an enterprise project).
The persistence.xml points to the datasource in my instance of GlassFish (external to NetBeans).
When I select "recapture schema from database", I don't see any of my new tables when expanding the schema node under
"Configuration Files".
Likewise if I select "New / Entity Classes from Database" with the schema selected, I do not see them.
However, if I change the radio button in that dialog to "data source" instead of "database schema", where the data
source is the JNDI name of the GlassFish resource (e.g. "jdbc/phoenix"), I can see the new tables.
This is an EJB3 project with NetBeans 6.5 and GlassFish 2.1 build 60e. Source format is set to Java 6.
Comment 1 gholmer 2009-01-15 22:02:39 UTC
I notice after adding the new tables this way that there is now another schema named "public_phoenix-ejb_1.dbschema".
Comment 2 pslechta 2009-05-13 13:28:38 UTC
Product Version: NetBeans IDE Dev (Build 090506)
Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)

Recapture db schema does not work for me. I have already captured schema from my database and need to refresh it:
1) connect to db
2) create new table
3) disconnect
4) select myschema.dbschema file, right click > Recapture schema from database
5) ERROR: newly created table is not in the recaptured schema (tree)
Comment 3 Sergey Petrov 2009-07-29 12:21:45 UTC
*** Issue 161679 has been marked as a duplicate of this issue. ***
Comment 4 Jiri Rechtacek 2009-10-08 15:22:41 UTC
IMHO it works as designed. While creating a scheme users have to specify set of tables which the schema contains.
Recapture schema from database updates only the table specified when creating. In a user add new column into exiting
table, Recapture adds this column into schema. It means, recapture handles only specified tables, not more. I guess it
works correctly in my point of view.
Comment 5 jimmgrogan 2010-02-26 18:49:36 UTC
Comment #4 says "IMHO it works as designed."

Does that mean netbeans users are not allowed to add a table to a schema? If they can, how do they do it?
Comment 6 Jiri Rechtacek 2010-04-13 13:37:09 UTC
> --- Comment #5 from jimmgrogan <jimmgrogan@netbeans.org>  2010-02-26 18:49:36 ---
> Comment #4 says "IMHO it works as designed."
> 
> Does that mean netbeans users are not allowed to add a table to a schema? If
> they can, how do they do it?
In the case user creates new tables outside of existing DB schema, s/he can remove it and generate new schema again with new tables.
Comment 7 djabba74 2010-12-13 10:47:30 UTC
Deleting and capturing the dbschema with the same name does not work. The operation takes a blink of an eye but no dbschema file is created.
Capturing the dbschema to a different filename does work.

I tried it in both NB 6.7.1 and 6.9.1.
Comment 8 djabba74 2010-12-13 12:40:32 UTC
(In reply to comment #7)
> Deleting and capturing the dbschema with the same name does not work. The
> operation takes a blink of an eye but no dbschema file is created.
> Capturing the dbschema to a different filename does work.
> 
> I tried it in both NB 6.7.1 and 6.9.1.

The Capturing dialog is openend behind netbeans. That's why I thought there is nothing happening. After some seconds, the dbschema appears in Netbeans... including the new tables. Why does the capture dialog get opened in the background?