Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » How to filter by a parent field in a link1 transaction
Re: How to filter by a parent field in a link1 transaction [message #1498 is a reply to message #1497] Thu, 17 July 2008 16:49 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2350
Registered: April 2006
Location: Surrey, UK
Senior Member
If you have obained a value for 'fecini' in $dbouter then you need to modify the primary key which is extracted from $dbouter before it is passed to $dblink. If you look in file 'std.link1.inc' you will see that this is performed at line 217 with the following code:
// get primary key of current row retrieved from OUTER entity
$pkeynames = $dbouter->getPkeyNamesAdjusted();
$where = array2where($outer_data, $pkeynames, $dbouter);

This calls the _cm_getPkeyNames() method to make any adjustments, so you should use this instead of _cm_filterWhere() which is used by the RECEIVING object not the GENERATING object. You should also use 'fecini' for the field name instead of 'categoria.fecini' as all field names returned by an sql SELECT statement are unqualified.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: override noedit on foreign field in multi2
Next Topic: How ro remove the 'page created in' message
Goto Forum:
  


Current Time: Thu May 16 04:03:10 EDT 2024

Total time taken to generate the page: 0.01172 seconds