You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Scott Anderson <sa...@airvana.com> on 2008/09/12 21:39:41 UTC

RE: DbMerger/MySQL compatibility

In DbLoader.java, circa line 380, there is a reference to the NULLABLE
field. In the ResultSet I'm looking at, there's no such field - there is
however an IS_NULLABLE field.

-----Original Message-----
From: Tore Halset [mailto:halset@pvv.ntnu.no] 
Sent: Thursday, August 28, 2008 3:19 PM
To: user@cayenne.apache.org
Subject: Re: DbMerger/MySQL compatibility


On Aug 28, 2008, at 21:03, Scott Anderson wrote:

>> Is it possible to detect this via jdbc?
>
> A rather long-winded way to detect table type is:
> SHOW CREATE TABLE [table name];
>
> This will return the full CREATE TABLE instruction required to rebuild
> that table. If this is already how you determine what the fields look
> like, it should be trivial to add logic to parse the ENGINE parameter.

Currently, I use jdbc metadata only.

  - Tore.

RE: DbMerger/MySQL compatibility

Posted by Scott Anderson <sa...@airvana.com>.
Disregard the previous email, I spoke too soon. This is looking like a
bug in the MySQL/J driver; it's reporting the field as nullable when it
isn't.

-----Original Message-----
From: Scott Anderson [mailto:sanderson@airvana.com] 
Sent: Friday, September 12, 2008 3:40 PM
To: user@cayenne.apache.org
Subject: RE: DbMerger/MySQL compatibility

In DbLoader.java, circa line 380, there is a reference to the NULLABLE
field. In the ResultSet I'm looking at, there's no such field - there is
however an IS_NULLABLE field.

-----Original Message-----
From: Tore Halset [mailto:halset@pvv.ntnu.no] 
Sent: Thursday, August 28, 2008 3:19 PM
To: user@cayenne.apache.org
Subject: Re: DbMerger/MySQL compatibility


On Aug 28, 2008, at 21:03, Scott Anderson wrote:

>> Is it possible to detect this via jdbc?
>
> A rather long-winded way to detect table type is:
> SHOW CREATE TABLE [table name];
>
> This will return the full CREATE TABLE instruction required to rebuild
> that table. If this is already how you determine what the fields look
> like, it should be trivial to add logic to parse the ENGINE parameter.

Currently, I use jdbc metadata only.

  - Tore.