On Thursday, August 9, 2012 2:59:36 PM UTC-4, Jeremy Evans wrote: > > This is expected behavior. When you create the class, it needs to > introspect the database to find the columns. What's the problem with > opening the database connection first? The general way to do this is to > just have the model code in a separate file(s), and don't require that file > until after the database connection has been made. > > If you really need to load the model classes before the database > connection, you can create anonymous model classes, and don't call > set_dataset on them until after the database connection has been made. > However, you'll find that many things won't work if the model class does > not have a dataset. > > Jeremy >
It's hardly a problem, it just seems a little less abstract than you'd (well, I'd) like OO code to be but I understand the trade off. Just wanted to make sure I wasn't missing something. Thanks! -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/s5BwIKYZqH0J. 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.
