I probably wouldn't hard code "session.dsn" into my model. Rather i'd create a component that knows where to looks for the datasource for the current user, e.g in session, and then inject this into your model. This way you encapsulate the logic and storage of your per user dsn, without your model having to be aware of any of the details.
On 3 November 2011 16:13, Irvin Wilson <[email protected]> wrote: > I've also thought about the reporting piece. Each user is an island > but if I wanted to do some averaging stuff or whatnot I'd pull copies > (assuming more than one dsn) and work with that offline. Probably do > that anyway even if one datasource. As to the original question do > you think just setting session.dsn upon login makes the most sense? I > suppose each function that's about to touch a database could look for > it and if not there kick out to login screen. > > Thanks! > > -- > Model-Glue Sites: > Home Page: http://www.model-glue.com > Documentation: http://docs.model-glue.com > Bug Tracker: http://bugs.model-glue.com > Blog: http://www.model-glue.com/blog > > You received this message because you are subscribed to the Google > Groups "model-glue" 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/model-glue?hl=en > -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" 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/model-glue?hl=en
