Hi,
I'm trying to use the adapter in Rails 4 but there's a bug quite weird which prevent me from using it correctly.
When I'm creating a new record or fetching an existing one, it doesn't load its primary key. For instance I have a table like this:
Table---
id (int4) pkey
ref_key(int4)
I'm fetching a record using ref_key:
Table.find_by(ref_key: 5)
And it returns a record:
table(id: (null), ref_key: 5)
where the primary key id hasn't been loaded.
Is there someone else experiencing the same problem? If not, do you have any idea why I could have this problem? Can it come from the table definition in Redshift? (the id is using an Identity for instance)
Thank you! I'd be happy to help updating the adapter if necessary.
Hi,
I'm trying to use the adapter in Rails 4 but there's a bug quite weird which prevent me from using it correctly.
When I'm creating a new record or fetching an existing one, it doesn't load its primary key. For instance I have a table like this:
Table---
id (int4) pkey
ref_key(int4)
I'm fetching a record using ref_key:
And it returns a record:
where the primary key id hasn't been loaded.
Is there someone else experiencing the same problem? If not, do you have any idea why I could have this problem? Can it come from the table definition in Redshift? (the id is using an Identity for instance)
Thank you! I'd be happy to help updating the adapter if necessary.