Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

UUID: got error on jruby #55

Open
walla opened this issue Apr 23, 2012 · 2 comments
Open

UUID: got error on jruby #55

walla opened this issue Apr 23, 2012 · 2 comments

Comments

@walla
Copy link

walla commented Apr 23, 2012

Hi!
Got this error when using dm on jruby with UUID field type:
ERROR: column "c$uuid" is of type uuid but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 88 (code: 0, sql state: 42804, query: INSERT INTO "t$gp_events" ("c$uuid", "c$number", "c$s", "c$tx", "c$ac", "c$d") VALUES ('48cfcb78-5883-4d58-b81c-b4d2e6dd304b', '100487', '1.0', '1000000041342594267', '68473', '2012-04-23 16:03:14.000000 +04:00:00'), uri: )

my model:

class Events
  include DataMapper::Resource
  storage_names[:default] = 't$gp_events'
  property :uuid, UUID, :field => 'c$uuid', :key => true
  property :number, Integer, :field => 'c$number'
  property :s, Float, :field => 'c$s'
  property :tx, Integer, :field => 'c$tx'
  property :ac, Integer, :field => 'c$ac'
  property :d, DateTime, :field => 'c$d'
end

everything fine on MRI

@ghost
Copy link

ghost commented Apr 23, 2012

The UUID property will end up in the database as a simple string, dm-types doesn't know about the uuid column type.

@walla
Copy link
Author

walla commented Apr 23, 2012

sure. but just the same code works fine with MRI(1.9.2) and give such error on JRuby(1.6.7) datamapper 1.20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant