[SqueakDBX] SQLite, DBX y select en el from

Guillermo Polito guillermopolito at gmail.com
Mon Jun 13 12:42:28 UTC 2011


On Mon, Jun 13, 2011 at 9:38 AM, Alan Knight <knight at acm.org> wrote:

>  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
>

Great! I'll try that :D

Thanks!
Guille


>
>
>  ------------------------------
>
>  Guillermo Polito <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
>
>
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>
>

-- 
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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20110613/479880f2/attachment-0001.htm


More information about the SqueakDBX mailing list