[Haskell-cafe] Using HaskellDB on Tables that contain same column names

R. Emre Başar reb at cs.bilgi.edu.tr
Sat Oct 31 06:38:06 EDT 2009


Hi all,

I'm trying to create a HaskellDB application for keeping the inventory
of a set of devices. My database includes some tables which have some
columns with same names. Here is an example:

Server: id, name, vendor (fk), model(fk), system_id (always null)
Vendor: id, name
Model: id, name

I'm trying to join those three tables and create a result that contains
the names of the server, vendor and model. I use the projection:

project (Server.name << s!Server.name #
         Vendor.name << v!Vendor.name #
         Model.name << m!Model.name #
         Server.system_id << s!Server.system_id)

When I execute the query, the result contains just the name of the
servers repeated three times. When I check the generated SQL, I see that
it generates not what I expected.

Am I missing something here?

If you need, I can put the full source & generated SQL to somewhere.

-- 
R. Emre Başar
İstanbul Bilgi University
Department of Computer Science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20091031/da540f9c/attachment.bin


More information about the Haskell-Cafe mailing list