RavenDB Studio saving '1.0' as integer type, causing API change detection to always return true.

21 views
Skip to first unread message

Kyle Levien

unread,
Aug 15, 2017, 8:00:27 PM8/15/17
to RavenDB - 2nd generation document database
We have a document that contains a double field "SiblingPosition" that is initialized to 1.0 
Loading this document through the API, doing nothing, and calling SaveChanges() correctly does not trigger a change and the BeforeSave() listener is not called.
If we go to the document in the raven html5 studio and make a manual edit to an unrelated field (i.e. CreatedUser) and save this appears to set SiblingPosition as type Integer. 
When we repeat the load, do nothing, call SaveChanges() the BeforeSave() listener is fired. 
I looked further with the WhatChanged() function and indeed the SiblingPosition field is flagged as a 'FieldChanged' change with OldType=Integer and NewType=Float.

The field is loaded in the studio editor as just '1' and the above behavior still reproduces if I save it as '1.0' as well, it is converted back to '1.'
If I save it as '1.1' in the studio however, it is properly stored as Float.

This appears to be a bug in the parsing in the studio editor?

Oren Eini (Ayende Rahien)

unread,
Aug 16, 2017, 9:39:06 AM8/16/17
to ravendb
Yes, I'm pretty sure that this is the studio being overly helpful here. 
I created an issue for this:

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages