Dear list,
feel free to call me "stupid" and make this "wontfix". I just stumbled
upon a weird problem and it took me a while to find the cause.
Wrong:
class VirtualDomain < Sequel::Model
one_to_many :virtual_users, :key => 'domain_id'
…
Right:
class VirtualDomain < Sequel::Model
one_to_many :virtual_users, :key => :domain_id
…
I know that the documentation says to use symbols like :domain_id and
not strings like 'domain_id'. If strings should not be used I would
appreciate to get warned about that. Because what happens (in MySQL)
when you use a string is:
SELECT * FROM `virtual_users` WHERE ('domain_id' = 1);
=> Empty set
Using symbols it issues the correct query:
SELECT * FROM `virtual_users` WHERE (domain_id = 1);
=> Rows…
Just wondering if it's worth to make Sequel complain it or magically use
the right SQL anyway.
Kindly
Christoph
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.