Log in

OCLOperators sqlpassthroughobjects

From MDrivenWiki

Example of using the sqlpassthroughobjects

The two examples below can be used in a derived association

If you already have the primary key available you can to like this
Kundfaktura.sqlpassthroughobjects('select ' + self.FakturaReferensnummer.toString )->first
If looking for a specific object using some field
Kundfaktura.sqlpassthroughobjects('select FAKTURA_ID from tbl_FAKTUROR where FAKTURA_ID = ' + self.FakturaReferensnummer.toString )->first


  • You can use @variable in your sql because it is automatically available because it's a variable available 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)