[Nitro] STI patch

Jonathan Buch john at oxyliquit.de
Thu Aug 24 10:43:12 EDT 2006


Hi,

had a little debug session with manveru today, but at last we solved it.

<manveru>	it seems like a complete waste of time...
<manveru>	a whole 2 days for a 7-lines patch

This error prevented at least tc_inheritance2.rb and tc_ez.rb from  
succeeding because it produced wrong "CREATE TABLE" code.

[CREATE TABLE ogtc_oginheritance2_project (ogtype VARCHAR(30), koko text,  
oid serial PRIMARY KEY, kaka , haha );]

Big picture (as I understood it):  The annotations used for getting the  
correct sql type are partly in the parent class but also in the child  
classes, which didn't get asked.

It now loops over the child classes to collect the correct annotations.

Furthermore a second bug was fixed where all properties from parent class  
plus child classes were accumulated, which resulted in sql like:

[CREATE TABLE ogtc_oginheritance2_project (ogtype VARCHAR(30), koko text,  
oid serial PRIMARY KEY, koko text, oid serial PRIMARY KEY, kaka , koko  
text, oid serial PRIMARY KEY, haha );]

Anyway, solved now too, by a .uniq at the right place :)  All thanks go to  
manveru :P

Jo

-- 
Feel the love
http://pinkjuice.com/pics/ruby.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sti.ptch.tar.bz2
Type: application/bzip2
Size: 6364 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060824/d5de43b0/attachment.bin 


More information about the Nitro-general mailing list