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/ _______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/