You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now my doubt is when i do p.save "null" get stored in the couchdb, which I dont want. If i don't use array, then null gets auto deleted , I want the same feature for the array as well.
Can you please suggest something?
The text was updated successfully, but these errors were encountered:
Looks like the "null" handling on embedded models is not working as expected with arrays. I've not noticed this in the past. I'm planning to refactor some of the attribute handling, so I'll try and fix this then, unless I receive a pull request earlier ;-)
I am using couch-rest model gem and below is my snippet code.
class S
include CouchRest::Model::Embeddable
property :s1, String
property :s2, String
end
class P < CouchRest::Model::Base
property :name, String
property :xx, [S]
end
p =P.new
p.xx << S.new(s1: "S1 EXISTS")
p.xx << S.new(s2: "S2 EXISTS")
p.save
Now my doubt is when i do p.save "null" get stored in the couchdb, which I dont want. If i don't use array, then null gets auto deleted , I want the same feature for the array as well.
Can you please suggest something?
The text was updated successfully, but these errors were encountered: