Replies: 2 comments 1 reply
-
If you can change the schema, that's definitely a easiest way to work around the issue, but I'm guessing you don't have the option. You probably want to use the column_conflicts plugin. |
Beta Was this translation helpful? Give feedback.
1 reply
-
As expected, it works. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Jeremy,
It is a tricky one, I guess.
I've created models for already existing Oracle and Postgres DBs that sadly use columns named 'object_id' as id.
Both with models and with datasets I've encountered the following Issue that you might reproduce with:
As workaround I've been using
def_column_alias :oid, :object_id
but there is a catch:Used in associations
oid
will work at an instance level, but not at Class level using eager_graph for instance,.As a solution I've defined 2 associations for each reltion, one to use with instance associations using
oid
, and another to deal with eager_graph for the same exact association using the column nameobject_id
.I doesn't seem a bug to me.
Have you ever had such Issue, or have you a suggestion to better address such Issue?
Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions