#1162 new

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:

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:

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket