Re: saveChanges() doesn't change globalID

Sebastien Bigaret <[email protected]> 10 Sep 2004 00:36:15 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
Marcos Dione <[email protected]> wrote:
> User-Agent: Mutt/1.3.28i
>=20
> On Thu, Sep 09, 2004 at 12:41:11PM +0200, Sebastien Bigaret wrote:
> >   More details in case you're interested and you want to investigate
> >   this: changing newly inserted objects gIDs is done at the very end of
> >   the saveChanges() process, and DBContext.finalizeCommitChanges() is
> >   responsible for this. It broadcasts a GlobalIDChangedNotification,
> >   handled by ec.handleNotification() (among other possible observers)
> >   which in turn re-registers the object with its newly assigned
> >   KeyGlobalID.
>=20
>     according to the comments in ec.handleNotification(), the PK is not
> changed to a GlobalID until then, so I can assume that code isn't
> reached, so maybe an exception is trown earlier. I'll try to find it
> tomorrow (now I gotta run to another job).

  Okay, if you do not have much time you cannot investigate it any
deeper --but still, a portion of code exhibiting the problem (as opposed
to: diagnosing the problem) could be enough, so just send it as-is if
you have it :)

>     I also saw a few debug(), warn() and trace() callings, and found
> their declaration in logging.py. should I assign log_stderr to them so
> they show something? I see that no_log can receive a severity param, but
> log_stderr doesn't. should I fix that?

Nope. If you want to activate all message simply replace the line
saying:
    trace=3Ddebug=3Dinfo=3Dlog=3Dwarn=3Derror=3Dfatal=3Dno_log
with:
    trace=3Ddebug=3Dinfo=3Dlog=3Dwarn=3Derror=3Dfatal=3Dlog_stderr

and set MDL_ENABLE_DATABASE_LOGGING to '1'.


-- S=E9bastien.



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php