
find_by_sql with custom field name
Reported by Antti | December 21st, 2009 @ 02:59 PM
find_by_sql will fails to load and map properties values correctly when using custom field name specified as
property :my_field, Integer, :field => 'some_field'
It skips this field, and next field values are assigned wrong.
You can view problem here:
http://gist.github.com/263943
It skips bugged_field property and sets value "BuggedField1" to not_a_bug property.
I made myself a patch, don't know how correct it is, but it
works for me:
http://github.com/Antti/dm-more/commit/291dd0f961c12faf52e38581bfb6...
Comments and changes to this ticket
-
Antti December 21st, 2009 @ 03:01 PM
- Tag set to dm-ar-finders, find_by_sql
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »