We are having a problem with a field that automatically gets set to the current date/time when the row is created. In Sql2Java 2.6.5 the field in the generated bean is this:
private java.util.Date dateAdded = (getdate());
In Sql2Java 2.4.0 it is this:
private java.util.Date dateAdded;
The "(getdate())" in the 2.6.5 version causes a compile error. The 2.4.0 version of the bean works fine. We are using SQL Server 2000. Could a bug have been introduced somewhere between the 2.4.0 and 2.6.5 versions?
Thanks,
Joe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are having a problem with a field that automatically gets set to the current date/time when the row is created. In Sql2Java 2.6.5 the field in the generated bean is this:
private java.util.Date dateAdded = (getdate());
In Sql2Java 2.4.0 it is this:
private java.util.Date dateAdded;
The "(getdate())" in the 2.6.5 version causes a compile error. The 2.4.0 version of the bean works fine. We are using SQL Server 2000. Could a bug have been introduced somewhere between the 2.4.0 and 2.6.5 versions?
Thanks,
Joe
More than one bug have been introduced between 2.4.0 and 2.6.5! Many of them have been exterminated though!
The one you are referring to is related to some feature request to implement the database default value:
http://sourceforge.net/tracker/index.php?func=detail&aid=1093516&group_id=54687&atid=474470
Unluckily the value that can be set in not always as simple as "a value" but more often is a call to some database function that can not be reproduced in the Java code. To solve your problem take a look at that bug description:
http://sourceforge.net/tracker/index.php?func=detail&aid=1794354&group_id=54687&atid=474467
Sorry for the inconvenience and thank you for your reporting.
Alain.