Query all objects which contain an object in the one-to-many relation?

I have a data table called “Event” which has a one-to-many relation to the “Plug” table. I want to retrieve all Event objects which contain a certain Plug object in the one-to-many relation. I’ve looked through the Docs but I can’t find the solution. Thanks!

That’s easy, use the following whereClause when retrieving data from Event:

relatedColumnForPlugs.objectId = ‘objectId-of-the-related-plug-object’

Cheers,
Mark