yhknight / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

OProperties.datetime assigning current date and time when null is passed #195

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Assign a null value to OProperties.datetime
2.
3.

What is the expected output? 
In this case null would be the expected output

What do you see instead?
the current data and time.

What version of the product are you using? On what operating system?
odata4j.0.6.0-bundle on Windows 7 64bit

Please provide any additional information below.
The structure of my entity is as follows:
OEntity newPerson = c.createEntity("Person")
    .properties(OProperties.datetime("DateOfBirth", myPerson().getDateOfBirth()))
... (more fields)
        .execute

When the value of getDateofBirth (a java.util.Date) is a valid date all works 
fine, but when the value is null then the OProperty value is set to the current 
date and time.

Original issue reported on code.google.com by DarrylBr...@gmail.com on 30 Jul 2012 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by philipp.sebastian.thun on 31 Jul 2012 at 4:24

GoogleCodeExporter commented 9 years ago
Fixed with revision ebcc9d46be6d.

Original comment by philipp.sebastian.thun on 31 Jul 2012 at 4:42