[Dbix-class] Ad-hoc LEFT OUTER JOIN - possible ?
Joss Shaw
jossblowing at yahoo.co.uk
Tue Jun 12 17:58:12 GMT 2007
Hi all,
I've got this snippet of SQL which I'm trying desperately to convert to DBIx::Class.
SELECT stuff
FROM Timetable ttb
LEFT OUTER JOIN Person prs ON
(addr.UNIQUE_ID = prs.UNIQUE_ID AND
(
(addr.availableFrom <= prs.availableTo AND addr.availableTo >= prs.publishedFrom
)
etc., etc
Basically there is a table between this Timetable <-> Person "relationship", which is where I am having problems in doing a Timetable->search( { conditions } );
Timetable:
availableTo
availableFrom
UNIQUE_ID
Owner:
UNIQUE_ID
Person:
availableTo
availableFrom
UNIQUE_ID
A lot of other stuff is going on here which is why the relationships seem a little stupid but... I guess it's a MANY-to-MANY between Addressing and Timetable. Ive got no idea how i can actually write a dbixc search command to perform this kind of join... is it even possible ? Anything gratefully received
best,
>j
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070612/a75ac16b/attachment.htm
More information about the Dbix-class
mailing list