This project is archived and is in readonly mode.
Finder :include assoc with same name as key fail on Postgres
-
Frederick Cheung
It seems to me that you are already skating on thin ice by doing this.
-
Martin Sadler
Frederick, thanks for the comment. Would you care to expand on that?
-
Frederick Cheung
Just stuff that would normally work like update_attributes (eg if you were updating a record) and generally other stuff that assumes it can use the accessors to access an attribute (which code usually should because you could have overridden that accessor with good reason)
-
Pratik
- State changed from new to incomplete
- Tag set to activerecord, associations, bug, edge, patch, postgres
I'm getting 2 tests failures on MySQL after applying this.
I kinda agree with Fred that you're already walking on thin ice, if not skating.
I think it'd be much easier if you just call your association 'creator' or something similar, which is not a column name.
But if the fix is very simple ( as it is in the patch ), probably wouldn't hurt to apply.
-
Martin Sadler
Hey Pratik, I would close this ticket for now.
I ended up renaming created_by/updated_by to created_by_id/updated_by_id in the database and made a few tweaks to the plugin to handle the change.
Makes more sense and goes with the Rails way of thinking.
-
Pratik
- State changed from incomplete to wontfix
