-
1. Re: CMP and java.util.Calendar
raja05 Apr 15, 2003 12:21 PM (in response to d3tommy)Im not sure if this could be done, I may be wrong but as far as i can see, the types in standardjbosscmp-jdbc.xml map to valid java.sql.Types and there is no type for Calendar defined in java.sql.Types.
you may have to convert ur Calendar to date somewhere! -
2. Re: CMP and java.util.Calendar
pdelgado0 Apr 15, 2003 1:02 PM (in response to d3tommy)
I'm using Jboss 3.2 with Postgres 7.3.1 and in the file jbosscmp-jdbc.xml I put the following and it works with no problem.
.....
.....
<cmp-field>
<field-name>initdate</field-name>
<column-name>initdate</column-name>
<jdbc-type>DATE</jdbc-type>
<sql-type>timestamp without time zone</sql-type>
</cmp-field>
.....
.....
Remember that the <jdbc-type> has to be a "java.sql.Types" so Calendar couln't be.
http://stein.cshl.org/jade/distrib/docs/java.sql.Types.html
Good luck.
Pablo -
3. Re: CMP and java.util.Calendar
d3tommy Apr 16, 2003 3:17 AM (in response to d3tommy)If I understand you correctlly there is no way to mapp a postgrsql type TIMESTAMP (with timezone) to a java class that handels both the timestamp and the timezone information (I can't find any in java.sql.TYPES).
If this is the case, does it exist some pattern or "workaround" to get this done anyway.