Ciao-

I've been playing with sequel the last two days to implement a backing
store for some simulations I'm running.  So far it's been pretty easy
to get into, but as I've been cleaning up and getting the code ready
for use, a non-trivial problem has cropped up.

I originally had my Model's in the top-level namespace, and when tried
to move them to a proper location in my library namespace the
tablename went bad.  For example, something like:

class Graph < Sequel::Model
....
end

became:

module Rglabs
  module Db
    class Graph < Sequel::Model
      ...
    end
  end
end

I cleared out the database and called create_table on Graph.  But
instead of working, mysql spit out the following error:

/var/lib/gems/1.8/gems/sequel_core-1.0.8.2/lib/sequel_core/adapters/
mysql.rb:125:in `query': You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near '/db/graphs (`id` integer PRIMARY KEY
AUTO_INCREMENT, `label` varchar(255), `dire' at line 1 (Mysql::Error)

Moving Graph out of Db and into only Rglabs also failed with the same
error, but with the tablename now '/graphs'.

So, it seems like the table auto-naming function isn't handling
namespaces properly.  Is this a feature I'm not understanding or a
bug?  Also, is there a way to set the name manually?  I can't seem to
find a method to do so.

Thanks!  Digging sequel so far!
Cyrus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to