views:

21

answers:

1

How to store java.util.Calendar field into one column with Datanucleus JDO. By default it is stored into two columns (millisecs, Timezone) with following JDO metadata.

field name="startDate" serialized="true" embedded="true" 
                                   persistence-modifier="persistent"

What need to be changed in metadata to store it into single column (Timestamp)?

Is it posible query (JDOQL) on calendar field when it is in two clumn?

A: 

Store it in 1 column and potentially lose the timezone, want that ? Metadata extension "calendar-one-column" set to "true" stores as 1 column (timestamp).

DataNucleus
<field name="startDate" calendar-one-column="true" persistence-modifier="persistent"/> Thanks, but this one is not working, Can you find any mistake on my metadata?
Rasika
Where in the JDO spec or in the DTD/XSD for package.jdo do you find that syntax? I said "extension".
DataNucleus
ok.. got it. Thanks, It works
Rasika