[SqueakDBX] auto increment on Squeak/Pharo - Glorp - Postgres

Yanni Chiu yanni at rogers.com
Thu Feb 25 06:43:13 UTC 2010


I didn't ever see the sequence select code, when I had run my code with 
LoggingEnabled. I had wrongly concluded that the feature was not working.

I have since loaded GlorpDBX via the metacello config, followed by the 
native postgres driver. BTW, the compiler tweak that allows '_' in 
method names did not get loaded when using ConfigurationOfGlorpDBX.

Two testcases failed - I'll send a separate email. So things looked okay 
with the native postgres driver. Then I used GlorpItinerary in a simple 
test case, which demonstrated that the sequence id's were working. When 
I moved this test case back to my original image, I found that the 
sequence id's worked there too.

I've not fixed the problem yet, but I have found dynamic descriptors is 
the root of the problem. Somewhere along the way, #tableNamed:ifNone: is 
called to create a DatabaseTable instance. It is supposed to have a 
GlorpSerialType instance that holds a PGSequence. This is done in 
DatabaseField>>postInitialize, but does not happen in my case. An 
exception gets thrown because no table initializer method is found 
(which should be the case, since I create the table dynamically). But 
this exception was being swallowed - don't know where yet.

That's how it's going - learning more about Glorp than I wanted to know.

-- 
Yanni


John Toohey wrote:
> Yep, mixed it up with my own logging method. Anyhow, the debug logging
> should show you what Glorp is doing when it calls the DB during the
> insert.
> 
> On Mon, Feb 22, 2010 at 14:09, Yanni Chiu <yanni at rogers.com> wrote:
>> John Toohey wrote:
>>> I have this working in Pharo with Glorp. Have you enabled debugging on
>>> your DescriptorSystem implementation? The Transscript should show
>>> exactly what Glorp is doing when you object is registered.
>> Okay. It's good to know that it can work. I am using dynamic Descriptors,
>> which may be a factor. I'll try the examples again.
>>
>> BTW, do you mean setting the LoggingEnabled class variable of the
>> DatabaseAccessor, or is there some other debugging on DescriptorSystem that
>> you mean.
>>
>> --
>> Yanni
>>
>> _______________________________________________
>> SqueakDBX mailing list
>> SqueakDBX at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>>
> 
> 
> 


More information about the SqueakDBX mailing list