Hi I am running into this issue while using factory_bot to instantiate some 
classes of type Sequel::Module for a test. I'm using rails and minitest. It 
is a Postgresql db and the table/module i am having an issue instantiating 
(inserting) is has a column "uuid" that has a type of bytea. I am try to 
assign it to a string representation of a uuid and it seems to get wrapped 
in a Sequel::SQL::Blob so not sure what I need to do to fix this:

 Sequel::Error: can't express #<Conversation @values={:id=>1, 
:uuid=>#<Sequel::SQL::Blob:0x2ac44dfd1074 bytes=36 start="089188fa-1" 
end="42ac120002">,  ... }> as a SQL literal

I am certain it is that column because if I leave it out I get a pq sql 
error trying to insert the row without specifying the uuid (its set to not 
null)

My factory looks like this:

FactoryGirl.define do
 to_create { |instance| instance.save }
   factory :conversation do
     id 1
     uuid '089188fa-1a36-11eb-adc1-0242ac120002' 
   end
end


My class looks like this:

class Conversation < Sequel::Model

end

Any ideas would be great from anyone.

 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/02ee7b1f-fb6d-4fc0-a922-30fde6731e6en%40googlegroups.com.

Reply via email to