[09:02] <tud> Do propel has the option to automatically join tables with their foreign key? I have some tables and would like to join them all with their foreign keys
[09:05] <Jarda> tud: you can do FooQuery::create()->joinWith('Foo.Bar')->find()
[09:06] <Jarda> didn't really get what you mean
[09:06] <tud> Is "Bar" the foreign key in your example?
[09:07] <Jarda> yeah
[09:07] <tud> thanks
[09:08] <tud> dorn here xD
[09:08] <tud> the problem is we need 2 join a lot of tables dynamicly
[09:08] <tud> is there a best pratice
[09:09] <tud> for example we get via get params ColumnA,TableA and ColumnB,TableB -> now we need 2 join those 2 tables and select the 2 coulmns
[09:09] <tud> this needs 2 be done dynamicly
[09:09] <Jarda> hmm.. ok
[09:09] <tud> any ideas?
[09:09] <Jarda> well
[09:10] <Jarda> you could in your FooQuery class write a public function joinByParameters(array $params) { foreach ($params as $parm) { $this->joinWith(...); } return $this; }
[09:10] <Jarda> or something like that
[09:10] <Jarda> depends on the specific use case
[09:12] <tud> so the best way is 2 use joinwith where u give the column u wanna join on?
[09:12] <Jarda> yeah, or actually it's the foreign key name you give as parameter
[09:13] <Jarda> <foreign-key foreignTable="bar"><reference local="bar_id" foreign="id" /></foreign-key> and then you use ->joinWith('Foo.Bar');
[09:13] <tud> what happens if u have done smith like this: tbl1->join with(tbl2.column) ->joinwith(tbl3.column)->join with(.... does that work?#
[09:13] <Jarda> you can have multiple joins, yes
[09:14] <tud> and he automatically detects how 2 join it? over multiple tables?
[09:14] <Jarda> yes, it should work
[09:16] <tud> for example if tbl1.A->tbl2.A and tbl1.B->tbl3.A but we join tbl1->join with(tbl2.A)->join with(tbl3.A) - this will work?
[09:17] <Jarda> if the foreign keys are wrintten in the schema, it should work
[09:17] <Jarda> try it out
[09:18] <tud> k much thx if that works its really amazing work ;-) much thx 4 the help