#108 invalid
Jeffrey Gelens

[BUG] Custom queries return wrong types

Reported by Jeffrey Gelens | December 27th, 2007 @ 09:51 AM

Somehow my previous bugreport got lost, so here we go again:

Using MySQL or SQlite3 all returned fields are a string, while some of them should be an integer.

irb(main):006:0> (Service.find_by_sql("select * from services"))[0]
=> #<struct #<Class:0xb7433368> id="1", server_id="1", name="M1-Domain0", status="0", monitor="1", collected="1198550696", kind="5">

Using PostgreSQL everything is ok:

irb(main):003:0> (Service.find_by_sql("select * from services"))[0]
=> #<struct #<Class:0xb7b02aa4> id=1790, name="M1-Domain0", status=0, monitor=true, collected=1198551630, kind=5, server_id=8>

Comments and changes to this ticket

  • Sam Smoot

    Sam Smoot December 27th, 2007 @ 09:52 AM

    • State changed from “new” to “invalid”

    Duplicate. Couldn't figure out how to delete dupes marked as spam, so approved 'em instead to mark as invalid.

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