Hi,
I've seen something like this used a few times here in the forums regarding an object that queries more than one table:
my $db = $DB->table('Links','CatLinks');
$db->select ( { isValidated => 'Yes', CategoryID => '1' } );
What I'm curious about is how does the database know on which fields to join the tables for the relational query? i.e. For this example, doesn't it need to know that "ID" in the Links table maps to "LinkID" in the CatLinks table?
I'm working on a project that involves something similar, so any wisdom imparted would be greatly appreciated!
Thanks,
Matt G
I've seen something like this used a few times here in the forums regarding an object that queries more than one table:
my $db = $DB->table('Links','CatLinks');
$db->select ( { isValidated => 'Yes', CategoryID => '1' } );
What I'm curious about is how does the database know on which fields to join the tables for the relational query? i.e. For this example, doesn't it need to know that "ID" in the Links table maps to "LinkID" in the CatLinks table?
I'm working on a project that involves something similar, so any wisdom imparted would be greatly appreciated!
Thanks,
Matt G