Hi Chris

Short answer is that if the many table is related to a field in the one table 
which is NOT the primary key of the one table, the you should ***ABSOLUTELY NOT 
USE ORDA*** to set the value of the many table field.

There is a horrible bug in ORDA where regardless of which field the relation is 
drawn to in the one table, it will always locate the one record by querying on 
the primary key field of the one record using the value you have entered into 
the many field.

Worse still, when you save the many record, the value you have entered in the 
related many field will automatically and silently be changed to the related 
one field value of the now incorrectly loaded one record, thus permanently 
linking the wrong two records together without any way of knowing that it has 
happened or of how to undo it!!

To the best  of my knowledge this bug exists in all versions of 4D since ORDA 
was introduced, on both Mac and Windows, and both 32- and 64-bit.

Regards
Justin

> On 19 Nov 2019, at 6:16 pm, Chris Belanger via 4D_Tech <[email protected]> 
> wrote:
> 
> I have a challenge,
> I have a CBOX technique that lets me set the correct related KEY into a 
> record’s field.
> It sets the correct value.
> But that related record is not ‘loaded’ after this correct value is loaded 
> into that field.
> 
> For example:
> 
> Two tables (in classic 4D nomenclature)
> [Units]    [UnitType]
> Many-to-one relation is  [Unit]UType
> 
> In ORDA, this relation is defined as  Units.UnitType
> 
> (   Units.UType  is the foreign key to the [UnitType] master record   )
> 
> When the record is first loaded, Units.UnitType is the correct — it has the 
> related master record from [UnitType]
> 
> However, If Units.UType is ever set to another unique key from the [UnitType] 
> table, the related record is not re-loaded; and Units.UnitType is null {i.e. 
> no related master record}.
> 
> 
> I do not see any way to trigger the re-load [i.e. CORRECT load] for the 
> related record  Units.UnitType  {the relation name for Units.UType’s 
> many-to-one to [UnitType]  }
> 
> ——
> 
> Is there a way to trigger the related ONE record to re-load in ORDA?  [i.e.  
> Units.UnitType to be correctly showing the [UnitType] record]
> 
> Confused?
> 
> Thanks,
> Chris
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  
> https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.4d.com%2Farchives.html&amp;data=01%7C01%7Cjustincarr%40geniesolutions.com.au%7Cad4c01f6c81f44014ba608d76cc8d450%7Cf9523ca0a897457dac3a9b46a9648991%7C0&amp;sdata=LFYdvJLcBHQeE1DrCsTMNgHcMHrJz9KLWyG7MATewUk%3D&amp;reserved=0
> Options: 
> https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.4d.com%2Fmailman%2Foptions%2F4d_tech&amp;data=01%7C01%7Cjustincarr%40geniesolutions.com.au%7Cad4c01f6c81f44014ba608d76cc8d450%7Cf9523ca0a897457dac3a9b46a9648991%7C0&amp;sdata=Vtu4KP5emmfMa7hTiSXxA5Hk6mt1%2B3x18Lw4Wyz9sGk%3D&amp;reserved=0
> Unsub:  mailto:[email protected]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to