Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructs not proper sql on insert #2

Closed
strikeroff opened this issue Sep 29, 2011 · 1 comment
Closed

Constructs not proper sql on insert #2

strikeroff opened this issue Sep 29, 2011 · 1 comment

Comments

@strikeroff
Copy link

Fails on type cast. Whin trying to save model Orders it fails:

Order.create :list => [1,2,3,4]

Constructed sql:

INSERT INTO "orders" ("list",  "created_at", "updated_at") VALUES (--- 
- 18
- 18
- 21
- 44
,  '2011-09-29 14:11:31.480726', '2011-09-29 14:11:31.480726') RETURNING "id"

Migration is as follows

    t.decimal_array :list

Error was

PGError: ERROR:  column "list" is of type numeric[] but expression is of type integer
LINE 2: - 18
@tlconnor
Copy link
Owner

tlconnor commented Feb 7, 2012

Fixed by pull request #5

@tlconnor tlconnor closed this as completed Feb 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants