OCLOperators sqlpassthroughobjects
This page was created by Lars.olofsson on 2018-04-02. Last edited by 62.169.16.147 on 2026-09-12.
Examples of how to use the sqlpassthroughobjects[edit source]
The two examples below can be used in a derived association.
If you already have the primary key available, you can do this:[edit source]
Kundfaktura.sqlpassthroughobjects('select ' + self.FakturaReferensnummer.toString )->first
If you are looking for a specific object using some field:[edit source]
Kundfaktura.sqlpassthroughobjects('select FAKTURA_ID from tbl_FAKTUROR where FAKTURA_ID = ' + self.FakturaReferensnummer.toString )->first
Notes:[edit source]
- You can use @variable in your SQL because it is an automatically available variable when the function is called.
- You need to quote strings to be passed (if they aren't variables), like self.Anvandarnamn above. The \' is an escaped quote in OCL (Escape codes).
