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.
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.
I notice after adding the new tables this way that there is now another schema named "public_phoenix-ejb_1.dbschema".
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)
*** Issue 161679 has been marked as a duplicate of this issue. ***
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 #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 #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.
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.
(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?