I realized the problem was that the caller of the ItemDataService methods 
had required the other models.  The problem was between my keyboard and 
chair.


On Friday, August 16, 2013 9:24:20 AM UTC-5, Keith Moore wrote:
>
> I am having a rather odd issue with a Sequel Model not getting initialized 
> on startup.  I have a Rails 3.2.13 app with Sequel 3.48
> and below is an example of what I am doing.
>
> # item.rb
> require 'sequel'
> class Item < Sequel::Model(:VW_ITEM)
> end
>
> # item_last.rb
> require 'sequel'
> class ItemLast < Sequel::Model(:VW_ITEM_LAST)
> end
>
> class ItemDataService
> def find_item_last 
>      ItemLast.where(<criteria here>).all
> end
>
> def find_item
>     Item.where(<criteria here>).all
> end
> end
>
>
> For some reason, ItemLast does NOT get initialized at startup.  However, 
> when putting a require 'item_last' at the top of ItemDataService, ItemLast 
> does get initialized.  
> Seems like that would be the case for Item and all the other Sequel 
> Models.  However, all the other models, including Item do get initialized 
> at startup.
> Anyone have any ideas as to why this is happening?
>
> Thanks,
>
> Keith
>

-- 
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.

Reply via email to