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
Arrays of Composite Types #8
Comments
After more trial-and-error, it looks like if I use the create_table do … end syntax array columns work, however if I directly create the table using CREATE TABLE, it gets confused and fails to save any objects to the table. Any idea what might be going on? Thanks! |
Upon further inspection, it looks like some sort of load issue. If I define a class on the console for a table like so:
It correctly loads the type. But if I reference a Model object in app/models, it does not. I put the following snippet in my application.rb:
|
Further trial-and-error indicates that if ActiveRecord encounters a column with an array of composite types before encountering a scalar column, it fails to load properly. |
Hi @loganb! Thanks for reporting this issue and sorry you had to wait such long time for any response. Since I was not directly involved in development of Things I'd like to know:
|
I'll try to nail down a simple repo case here shortly. |
@katafrakt I have this problem also. How do I have to solve it? I executed migration, than receive this message and cannot save to table.
Type Definition CREATE TYPE family AS
(
name character varying,
age integer
) Add column to table
Rails version4.2 |
@loustler This has something to do with PostgreSQL version. Which version are you using? |
@katafrakt PSQL version is |
@katafrakt Could you plz keep me updated about this issue? |
@loustler I wish I could - but please note that I didn't contribute any single line of code to this project. 9.6 should be supported version and my knowledge is probably too limited to debug this easily. Even if I did, I don't have push rights to publish new version to rubygems (@rafalbigaj do you have it?). So I'm sorry, but I'm probably not your man. |
Hello,
I just came across this great little gem. I'd like to use it to store arrays of composite types. It looks like that isn't supported right now; is this a planned feature? If so, do you have any thoughts on how it would be implemented? Thanks!
The text was updated successfully, but these errors were encountered: