commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matthew.hawthorne" <>
Subject Re: [Sql] Status
Date Fri, 27 Feb 2004 17:26:09 GMT
Dietrich, Harald wrote:
> - How is the JDBCModelReader supposed to handle default values? This is a
> problem espacially regarding the often used default date. I recognized that
> this seems to be handled as pure string.

I've noticed this also.  I submitted a bug about this a while back.  The 
default values in the the schema definition file aren't used if you 
don't set a value for that column.  So, even if I define a default date, 
when I'm creating my data using DynaBeans I have to set "NOW" for the 
dates.  It's annoying, and I'd like to fix it.

> - The individual SQL types of a database are not handled correctly because
> the type mapping is done using the java.sql.Types definitions. I recognized
> this when reading from a MSSql database I got complains about the types
> "NVARCHAR" and "NTEXT". Is it a target of Sql to handle these types correct
> as well or do you suppose to support only pure JDBC features?

I'm not sure about this one.  It really is up to the users to decide I 
guess.  I would prefer an architecture which would allow customized type 
mappings to be plugged in for situations like these.  But also, perhaps 
the project could be split into components, where the core code would 
sit in one area, and the database-specific things would sit in another.

For my Postgres db, I needed to find a way to alter the start value of 
my sequences, and also set permissions on my tables.  There's no way to 
do this with [sql].  I didn't want to manually write a SQL script to 
handle this, so I wrote an XSL style sheet which generates it from the 
schema definition.  It's pretty cool.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message