SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-471
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Phillip Rhodes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

Calendar Converter does not unmarshal for non-null values

Created: 11/Oct/07 10:28 PM   Updated: 12/Oct/07 09:21 AM
Component/s: Compass::Core
Affects Version/s: 1.2 RC1
Fix Version/s: None

Environment: all


 Description  « Hide

In my java class, I have a Calendar property. If this calendar is initialized to null, all is fine with compass. If I have it default to a new Calendar instance, compass will not update the value of the calendar with what is contained in it's index.

//This calendar is fine
Calendar goodCalendar = null;

//This calendar is bad
Calendar badCalendar = Calendar.getInstance();

I suspect that compass is checking the values and only setting them if they are not null.

Thanks!



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 12/Oct/07 09:21 AM
Yes, this will happen since Compass, by default, tries to optimize storing null values by not storing them. If you want Compass to store a null value, you can specify the null value within the mappings (it is part of 1.2 GA SNAPSHOT).