[SqueakDBX] SQLite, DBX y select en el from

Guillermo Polito guillermopolito at gmail.com
Mon Jun 13 04:32:26 UTC 2011


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.

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


More information about the SqueakDBX mailing list