Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dtp-dev] Primary key is not visualized correct

Hello Rob,

The generic catalog loader works pretty fine for MAXDB. The issue with
missing PK decorator is triggered, because JDBCTableConstraintLoader returns
null for PrimaryKey in method loadPrimaryKey(PrimaryKey existingPK) when PK
column is more that on (ResultSet.getString(COLUMN_PK_NAME) returns null).
This could be avoided if we set column name as pkName. In this case
PrimaryKey presentation will be created and columns, which are part of it,
will be added to it. 
Because this could solve similar issues with other databases, I think that
make sense to fix it in JDBCTableConstraintLoader. I would create request in
Bugzilla and even to present patch with fix. What is your opinion?

Best Regards,
Dimiter 

-----Original Message-----
From: dtp-dev-bounces@xxxxxxxxxxx [mailto:dtp-dev-bounces@xxxxxxxxxxx] On
Behalf Of rcernich@xxxxxxxxxx
Sent: Wednesday, 16. May 2007 19:21
To: DTP development mailing list
Subject: Re: [dtp-dev] Primary key is not visualized correct

Hi Dimiter,

> I'm using MAXDB database. I have no troubles to create data tables via
> SQLScrapbookEditor and respectively to create primary key field. The
execution
> passed successfully, but unfortunately I realized that the primary key is
not
> marked with its icon. I tried to create the same table in Derby database,
and
> primary key was visualized correct. Could you explain me what information
from
> the database definition/connection is necessary, in order primary key
field to
> be decorated as such.

The schema, tables, etc. in the data source explorer (DSE) are a
visualization of the SQL model.  The SQL model for a particular DB server
is instantiated via a catalog loader.  The default catalog loader uses JDBC
DatabaseMetaData calls to populate the SQL model.  Depending on the driver,
this works fairly well, not at all or somewhere in between.

That said, you're probably going to have to specialize the catalog loader
for your particular DB.  You can use Derby as an example.  (Note, Derby
relies on the generic functionality for populating primary key information.
However, other areas illustrate how the generic loader can be customized.
If all else fails, you can implement you loader logic from scratch.)

Hope that helps.

Sincerely,
Rob Cernich
DTP Connectivity Project Lead

_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top