#1162 new
Antti

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

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

Pages