OK, I dont know if you noticed that I added an option for you called "always_refresh" that you can add to a mapper, which will do just that.
so, now it should be established that you should have no issue. the rest of this email is just conjecture. if you dont like my advice on objectstore.clear(), then just stick with "always_refresh". you do a get/select, it loads from the DB, fresh every time, just like you asked. keep in mind that it blows away any changes on loaded instances as well since it is still mapping their identity. now onto objectstore.clear(). if you *are* doing a regular web application, then you should be calling objectstore.clear() at the start of every request....i cant think of a possible reason why you wouldnt want to do that. a new request is essentially a new "session" of information to be loaded. and there is hardly a web framework these days that does not allow some kinds of "init on every request" types of functions so you should only have to add it to one place. Florian Boesch wrote: > For instance there's a content table where each content is represented as > a > single row with type, name and title. > > Some of the more specific content-types reference other content, as in > there's > an intermediate association table and a relation property on the mapper. > > On principle title and the associations could change at any one time. The > name > and type usually don't change. > > Usually when I process a content-page I've got a specific handler for each > content-type. When the browser hits such a content-url my handler fetches > the a > content instance from a specific mapper, and then reads out the data he > needs to > pass on to the template. For instance a linklist content type would read > the > title of the linklist and the name and titles of all referenced contents. > > Then there's various other snipplets of information, which is fetched. > There's > two sections of my URLs path which I map to database rows, it's what I > call > "context" of a request. the toplevel context has associations to > configurations > in a configuration table where key/context is associated with value/type. > > Not sure if this gives a good picture, tell me if you need clarification > or more > concrete examples. > > Quoting Michael Bayer <[EMAIL PROTECTED]>: > >> is it possible for you to show us what youre doing ? I can come up >> with solutions a lot better if i see an actual use case. >> >> On Mar 29, 2006, at 2:44 AM, Florian Boesch wrote: >> >> > So since I don't know which objects might be updated, I clear them >> > all? >> > >> > Quoting Michael Bayer <[EMAIL PROTECTED]>: >> > >> >> Florian Boesch wrote: >> >>> >> >>> Now why would I get so incredibly pissed at this caching issue. >> >>> Well, it's >> >>> because Michael to my understanding basically told me in one go >> >>> that I'm a >> >>> stupid fuckwitt and that I have no business "sneaking" database >> >>> updates >> >>> past >> >>> his mapping code. That ah, did me in for. >> >> >> >> wow i never said that at all. i have learned that in these online >> >> forum >> >> kind of worlds, you *really* have to read carefully what you are >> >> responding to...especially if youre starting to get emotional. I >> >> am a >> >> veteran loser-of-cool in online communities, even quite recently >> >> to those >> >> who saw it happen (not in this forum)....i know all about the >> >> "reaction" >> >> phase. >> >> >> >> I didnt say you shouldnt use raw SQL; you can totally use raw SQL, >> >> but you >> >> should also tell the ORM to expire the apporpriate objects if >> >> youre doing >> >> so, so that it knows those have been changed behind its back. if >> >> you are >> >> issuing SQL, you should not expect the ORM to automatically detect >> >> that...and also shouldnt expect the ORM to work in such a way that >> >> assumes >> >> this technique is being used, since thats not the "default" use >> >> case for >> >> it. >> >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------- >> >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> >> language >> >> that extends applications into web and mobile media. Attend the >> >> live webcast >> >> and join the prime developer group breaking into this new coding >> >> territory! >> >> http://sel.as-us.falkag.net/sel? >> >> cmd=lnk&kid=110944&bid=241720&dat=121642 >> >> _______________________________________________ >> >> Sqlalchemy-users mailing list >> >> Sqlalchemy-users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users >> >> >> >> >> > >> > >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> Sqlalchemy-users mailing list >> Sqlalchemy-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users >> >> > > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users