Hello! I'm running into a little issue with update statements on models that I've aliased. Maybe I'm aliasing them the wrong way, I'm not sure. Would you mind taking a look? I'd love a little input. Thanks!
In an earlier post ( https://groups.google.com/forum/#!topic/sequel-talk/HB-rONDy_eg) I asked about using fully qualified names for joining models across databases, and this solution worked wonderfully. (Thanks again!) I've used that method on all of my models, but decided I'd like to alias the models as well to help clean up some of the join conditions and such. So, I've defined the models as such: class Table < Sequel::Model(DB.from(Sequel.qualify(:database, Sequel.qualify(Sequel.lit('[DBO]'), :table)).as(:tab))) When I call an for an update to a Table object, it results in SQL similar to this: UPDATE TOP (1) [DATABASE].[DBO].[TABLE] AS [TAB] SET [COLUMN] = 'value' WHERE [TABLEID] = 1 Unfortunately, this syntax isn't acceptable for MSSQL, and I receive a TinyTDS error. Is there anyway to disable the alias for update statements, or should I be aliasing them in a different manner? Thank you, in advance! Any help is greatly appreciated! -Patrick -- 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/d/optout.
