KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Restart 4D database to reload ORDA model layer after modifying database structure
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: September 27, 2018
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Before you can fully utilize the benefits from ORDA, there are some prerequisites to be aware of. One of these prerequisites include letting ORDA rebuild its references to the database after any modifcations to the data structure. Modifications include:


  • Adding or removing a table, field, or relation

  • Renaming a table, field, or relation

  • Retyping a field


Here's an example of not following this prerequisite. The Customers table has just been newly created and I want to start using ORDA's datastore command to access the Customers table.

C_OBJECT($customerSelection)
$customerSelection:=ds.Customers.all()


However, the executed code results in an error with the table name bolded in green as ORDA does not recognize the argument Customers.



Since ORDA's model layer only creates references to the database when the database starts up, and I created the Customers table afterwards, the Customers table will not be recognized by the datastore command. To fix this, simply close and reopen via the top toolbar File > Close Database or with the shortcut Ctrl + Alt + Shift + W.



Now when the code is executed again, you'll notice that the Customers text is no longer green but standard black text. The black color means that the table has been recognized.

C_OBJECT($customerSelection)
$customerSelection:=ds.Customers.all()