Sv: tables

Daniel Sananes daniel.s at
Sat Mar 18 19:51:56 UTC 2023

Hi Scotte

Would the object class have one $definefromsqlclass for the order-header and one for the orderrows?
And "helper table classes" for client.
In this case there would be 3 different $definefromsqlclass all assigned inside the object.
Then with returning-clause one would get the PK for the different datatables?

Is there correct OO to perform code inside a table to get values that do not belong to the table-instance?
I am almost not understanding my own question here.

Another question, are there situations where you would not use the table-instances but perform sql outside the table?
Do I understand this question? Maybe...


-----Ursprungligt meddelande-----
Från: omnisdev-en <omnisdev-en-bounces at> För Scotte Meredith
Skickat: den 16 mars 2023 23:51
Till: OmnisDev List - English <omnisdev-en at>
Ämne: Re: tables

> On Mar 16, 2023, at 3:39 PM, Das Goravani <goravanis at> wrote:
> Omnis says Table Classes are a special type of Object Class, or they are similar, but tables are nice.

Yes, a table class is a type of object that makes the built-in methods of a schema (or query) class visible and changeable.

If you take a new table class and set the $sqlclassname to your schema class and open the table class, you will see in red all of the built-in schema methods. You can then override them or create your own methods in there.

If the table class is a subclass of a generic table class, you will see in blue all the methods of the parent(s) class. Again, those can be overwritten.

And for more fun, you can create object classes to combine a bunch of table classes (and other code) to take care of all the interactions between different related tables. So you could have an Invoice object class that combined a table class for the header record of the invoice and a table class for the individual lines of the invoice and saved the header first and then the individual lines while putting in the foreign key to the invoice. And have helper table classes for the lookups into vendors, receipts, checks, and anything else that needed to be linked together.

Scotte Meredith
spomacguy at

Manage your list subscriptions at Start a new message -> mailto:omnisdev-en at
VARNING: Det här e-postmeddelandet kommer från en extern avsändare. KLICKA INTE på länkar eller bilagor om du inte känner igen avsändaren och vet att innehållet är säkert.

More information about the omnisdev-en mailing list