Hi

First time Sequel user here and I've got an issue I was hoping someone 
could help me with.

I am using the pg_array extension and am registering it with...

DB.extension :pg_array

When creating models from JSON data it works fine.

record = MyModel.new(jsonString)
record.save

However, when I load a record and try to update it.

record = MyModel.where(:id => 1)

if record.count == 1 then
  record.update(jsonString)  
end

It fails with the following error:

Sequel::DatabaseError - PG::InvalidTextRepresentation: ERROR:  array value 
must start with "{" or dimension information
LINE 1: ...nsferredTo" = NULL, "priority" = '1', "seenBy" = ('1'), "equ...
                                                             ^
It doesn't look like this is correctly picking up that the "seenBy" field 
is an array but this appears to fine when calling Model.new().

I've been trying to figure out this issue for a while now, I originally 
tried Slashdot but as nobody was able to assist I thought I might be better 
asking here. Any pointers would be greatly appreciated. 

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to