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.
Summary: | Primary key is lost in dbschema (PostgreSQL, MySQL) | ||
---|---|---|---|
Product: | db | Reporter: | tkrivanek <tkrivanek> |
Component: | DB schema | Assignee: | Radko Najman <rnajman> |
Status: | CLOSED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 4.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Generated schema using older driver - OK
Generated schema using newer driver - Bad, without PK Runtime tab screenshot Database schema screenshot |
Description
tkrivanek
2005-03-13 11:35:10 UTC
Created attachment 20805 [details]
Generated schema using older driver - OK
Created attachment 20806 [details]
Generated schema using newer driver - Bad, without PK
Can you please check whether the primary key is detected correctly when you browse the database using the database explorer in Runtime tab? Thanks. Yes, it is detected correctly in explorer regardless of JDBC driver version. Here are screenshots where you can see how it looks with pg73jdbc2.jar in explorer and in dbschema (PK and UNIQUE flag are lost). Created attachment 20828 [details]
Runtime tab screenshot
Created attachment 20829 [details]
Database schema screenshot
It should work now for all PostgreSQL drivers. It was caused by a change in the recent driver implementations - getIndexInfo() method now returns "f" value for NON_UNIQUE column. Unable to fix it for MySQL. In this case it is a driver bug. mysql-connector-java-3.0.16-ga-bin.jar returns "false" for getIndexInfo() NON_UNIQUE column, but mysql-connector-java-3.2.0-alpha-bin.jar returns "true". this issue will be marked as verified because it's quite old |