[Nitro] Regarding :include and :select and some SQL questions

Rui Miguel ravage at fragmentized.net
Sun Aug 12 09:41:48 EDT 2007


Hello!

Somehow i missed your reply to this issue...

Did the Og tests sent passed on your side?

Thanks,
Rui Miguel

On Aug 12, 2007, at Aug 12 - 04:05, Rui Miguel wrote:

> Hello!
>
> Attached is included some Og tests which fail using these  
> functionalities together. Hope i'm not doing anything wrong and  
> appreciate correction if i am.
>
> :select is very sensible and should be taken to attention if it  
> gets included in Nitro because when used with :include doesn't work.
>
> Implementation should be thought carefully. When using :select  
> with :include it's necessary to know, to which model a field  
> refers, which should be described when passing the :select argument  
> to avoid ambiguity.
>
> The current code breaks when passing two fields to :select.
> I changed it a bit so it would work when passing two or more  
> parameters, that's when i add the field ambiguity issue described  
> above.
>
> Regarding :include, would it be possible to change SQL generation  
> into "LEFT JOIN table2 ON table1.field = table2.field?
>
> Regarding Model.select, should this work,
> Model.select("select nome from ogaluno where turma_oid not in  
> (select oid from ogturma)"), returning only field "nome"? or how  
> should it behave? Just curious. Or a more simple one like  
> Model.select("SELECT * FROM oguser").
>
>
> Regards,
> Rui Miguel
>
> <og_tests.patch>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070812/fa1bc043/attachment-0001.bin 


More information about the Nitro-general mailing list