[SqueakDBX] SQLite, DBX y select en el from

Alan Knight knight at acm.org
Wed Jun 22 21:37:09 UTC 2011


Hmm, looks like it was introduced in November 2010, so fairly recent.  I 
think a quick hack version would be just to make the useSingleQuery: 
method ignore the boolean and leave the value as false all the time.


> ------------------------------------------------------------------------
>
> Guillermo Polito <mailto:guillermopolito at gmail.com>
> June 18, 2011 4:57 PM
>
>
> Hi Alan!
>
> I've finally not found any supportsSingleQueryHorizontalInheritance 
> selector in any Glorp class :(.  Maybe it exists in a different 
> version...  Do you have a clue for us?
>
> Thanks!
> Guille
>
>
> ------------------------------------------------------------------------
>
> Alan Knight <mailto:knight at acm.org>
> June 13, 2011 8:38 AM
>
>
> Yes, that's a clever thing that Glorp tries to do in order to read an 
> inheritance hierarchy as one query. The syntax that you have to use is 
> different between different databases. The simple thing is to disable 
> it for a particular platform using 
> #supportsSingleQueryHorizontalInheritance
>
> ------------------------------------------------------------------------
>
> Guillermo Polito <mailto:guillermopolito at gmail.com>
> June 13, 2011 12:32 AM
>
>
> Aloha, estoy teniendo un problemita con SQLite y DBX.
> En primer lugar, no se porque no pasa en las otras bases, es algo a 
> mirar quizas...
>
> Bueno, lo que pasa es que Glorp quiere tirar un query así (cuando 
> tiene un mapeo de una herencia):
>
> SELECT * FROM
>     (SELECT t2.ID, t2.NAME, t2.SERIAL_NUMBER, NULL AS t4nullField1, 
> NULL AS t4nullField2, NULL AS t4nullField3, NULL AS t5nullField1, NULL 
> AS t5nullField2, NULL AS t5nullField3, NULL AS t5nullField4
>  FROM NONPERISHABLE_ITEM t2, WAREHOUSE_ITEM_LINK t3
>  WHERE t2.ID = t3.ITEM_ID AND t3.WAREHOUSE_ID = 1
> UNION ALL
>     SELECT NULL AS t4nullField1, NULL AS t4nullField2, NULL AS 
> t4nullField3, t2.ID, t2.NAME, t2.AGE, NULL AS t5nullField1, NULL AS 
> t5nullField2, NULL AS t5nullField3, NULL AS t5nullField4
>  FROM PERISHABLE_ITEM t2, WAREHOUSE_ITEM_LINK t3
>  WHERE t2.ID = t3.ITEM_ID AND t3.WAREHOUSE_ID = 1
>
> UNION ALL
>     SELECT NULL AS t4nullField1, NULL AS t4nullField2, NULL AS 
> t4nullField3, NULL AS t5nullField1, NULL AS t5nullField2, NULL AS 
> t5nullField3, t2.ID, t2.NAME, t2.SERIAL_NUMBER, t2.ASSEM_COST
>  FROM UNASSEMBLED_ITEM t2, WAREHOUSE_ITEM_LINK t3
>  WHERE t2.ID = t3.ITEM_ID AND t3.WAREHOUSE_ID = 1) t2
>
> Y eso hace que OpenDBX devuelva como Description del query esto:
>
> an OrderedCollection(
> ('ID':Number)
>  ('NAME':String)
>  ('SERIAL_NUMBER':Number)
>  ('t4nullField1':a DBXTypeNotSupported)
>  ('t4nullField2':a DBXTypeNotSupported)
>  ('t4nullField3':a DBXTypeNotSupported)
>  ('t5nullField1':a DBXTypeNotSupported)
>  ('t5nullField2':a DBXTypeNotSupported)
>  ('t5nullField3':a DBXTypeNotSupported)
>  ('t5nullField4':a DBXTypeNotSupported))
>
> Porque evidentemente para definir los tipos del resultset, esta usando 
> solo la primera row parece.  ¿Bug de openDBX no?
> -- 
> You received this message because you are subscribed to the Google 
> Groups "proyecto_relacional" group.
> To post to this group, send email to proyecto_relacional at googlegroups.com.
> To unsubscribe from this group, send email to 
> proyecto_relacional+unsubscribe at googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/proyecto_relacional?hl=en.
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20110622/d3f91eb5/attachment.htm


More information about the SqueakDBX mailing list