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

Home » RADICORE development » Data Dictionary » Related Tables using different names fo primary Key Columns
Related Tables using different names fo primary Key Columns [message #2326] Thu, 29 October 2009 11:41 Go to next message
dicelord is currently offline  dicelord
Messages: 5
Registered: October 2009
Location: Tampa FL
Junior Member
I have a parent table with PK pid.
I have a child table with FK to parent fkid.

I build a relationship between the two tables mapping pid to fkid.

I then build a LIST2 screen I observe the $inner_where in std.list2.inc has pid='5' it should be fkid='5'.

I am running Radicore v1.51.0

I am sure I have made a silly mistake. Please help!


Paul Kratz
Re: Related Tables using different names fo primary Key Columns [message #2327 is a reply to message #2326] Thu, 29 October 2009 16:15 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
You have misunderstood how the parent relationship details in the Data Dictionary are used. They are used to construct the ON clause in JOINs when an sql SELECT statement is constructed, as documented in Using Parent Relations to construct sql JOINs.

They are not used to modify the WHERE string which is passed from one object to another as the receiving object has no idea which relationship is being used. This is documented in Different names for the same field.

This is also described in FAQ129.


[Updated on: Fri, 30 October 2009 09:14]

Report message to a moderator

Re: Related Tables using different names fo primary Key Columns [message #2328 is a reply to message #2327] Fri, 30 October 2009 09:41 Go to previous message
dicelord is currently offline  dicelord
Messages: 5
Registered: October 2009
Location: Tampa FL
Junior Member
Thanks for the pointer.
I overwrote the _cm_pre_getData function in the appropriate class and all is well.

Thank you!


Paul Kratz
Previous Topic: Importing a Database from Oracle
Next Topic: One subsystem with differents database names
Goto Forum:
  


Current Time: Tue Dec 03 13:53:17 EST 2024

Total time taken to generate the page: 0.01922 seconds