Re: [Glorp-development] Execute update
Status: Pre-Alpha
Brought to you by:
alan_knight,
anthonylander,
boris_popov,
cdegroot,
and 4 others
From: Alan K. <kn...@ac...> - 2007-07-26 16:56:09
|
It doesn't generate a row map on registering. Generating a row map only= happens when committing a unit of work. UnitOfWork>>#commit #preCommit #createRows #createRowsForPartialWrites #createRowMapFor: At 06:46 AM 7/26/2007, John Thornborrow wrote: >I've just been looking through this, I've placed a halt in the= #createRowsDorPartialWrites, and it creates a rowMap upon registering the= object, but not after the object is updated - I would guess this is a= problem as it cannot compare the current updates? > >John > >www.pinesoft.co.uk > >Alan Knight wrote: >>Well, it ought to. >>The most obvious reason I can think of that it might not is if it was= registered after the changes were made. Second most obvious would be if the= unit of work never committed. Third most is if the state is somehow not= mapped. But then it wouldn't insert properly either. >>I would say put a breakpoint somewhere interesting in unit of work code.= #createRowsForPartialWrites is a good one. And see why that object isn't= being written. That puts you right into the depths of things, but it might= be possible to follow. Basically it ought to be creating a rowmap entry for= that object, and a memento rowmap entry for the old state of that object,= and they should be different, so the new data will get written. >>At 01:03 PM 7/25/2007, John Thornborrow wrote: >>>As a semi-hijack; I am currently experiencing difficultly with updates= myself - i.e. the object is not updating the data. >>> >>>This is in conjunction with a rather complex flow within a Seaside= application; the object is an existing Glorp registered object (i.e. is a= result from #readOneOf:), and it will maintain the changes if the same= GlorpSession object is active (and thus is using the same cache) but the= database does not get updated. >>> >>>I realise this could be due to a number of reasons, but is there a way to= absolutely ensure the object will update the table? >>> >>>Many thanks, >>>John. >>> >>>www.pinesoft.co.uk >>> >>>Alan Knight wrote: >>>>Glorp detects if it's an insert or an update based on whether it had= read the object from the database previously or if it's new. So if you read= an object, then register it (which will happen automatically if it's read= during a unit of work) then make changes, those will automatically be done= as updates. >>>> >>>>At 09:47 AM 7/25/2007, Andr=E9s Garagiola wrote: >>>>>Hi, >>>>> >>>>>Anybody know how can i force an update statement with Glorp? >>>>> >>>>>I use the method #register: in the class Session for inserts, #delete:= for deletes and #read: (or some variant of read) for selects but i don=B4t= found an method for updates.=20 >>>>>Regars. >>>>>Andr=E9s >>>>>-----------------------------------------------------------------------= -- >>>>>This SF.net email is sponsored by: Splunk Inc. >>>>>Still grepping through log files to find problems? Stop. >>>>>Now Search log events and configuration files using AJAX and a browser. >>>>>Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>>>_______________________________________________ >>>>>Glorp-development mailing list >>>>>Glo...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/glorp-development >>>>-- >>>>Alan Knight [|], Cincom Smalltalk Development >>>>kn...@ac... >>>>ak...@ci... >>>>http://www.cincom.com/smalltalk >>>> >>>> >>>>=20 >>>> >>>> >>>> >>>>------------------------------------------------------------------------ >>>> >>>>------------------------------------------------------------------------= - >>>>This SF.net email is sponsored by: Splunk Inc. >>>>Still grepping through log files to find problems? Stop. >>>>Now Search log events and configuration files using AJAX and a browser. >>>>Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>> >>>> >>>>------------------------------------------------------------------------ >>>> >>>>_______________________________________________ >>>>Glorp-development mailing list >>>>Glo...@li... >>>>https://lists.sourceforge.net/lists/listinfo/glorp-development >>> >>>Pinesoft Computers are registered in England, Registered number: 2914825.= Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA >>> >>> >>> >>>This message has been scanned for viruses by BlackSpider MailControl -= www.blackspider.com >>> >>> >>>------------------------------------------------------------------------- >>>This SF.net email is sponsored by: Splunk Inc. >>>Still grepping through log files to find problems? Stop. >>>Now Search log events and configuration files using AJAX and a browser. >>>Download your FREE copy of Splunk now >> http://get.splunk.com/ >>>_______________________________________________ >>>Glorp-development mailing list >>>Glo...@li... >>>https://lists.sourceforge.net/lists/listinfo/glorp-development >>-- >>Alan Knight [|], Cincom Smalltalk Development >>kn...@ac... >>ak...@ci... >>http://www.cincom.com/smalltalk >> >>=20 -- Alan Knight [|], Cincom Smalltalk Development kn...@ac... ak...@ci... http://www.cincom.com/smalltalk |