cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Recursively called on handler

Raphael
Explorer
352

When making a SELECT from inside an on handler it calls the same on handler again.

const data = await this.run(SELECT.from(this.entities.Tags));

This only happens if the on handler is written using the "*".

this.on("READ", "*", async (req, next) => {

If the on handler is defined using single entities the SELECT statement won't call the on handler again.

this.on("READ", [Tags, Types], async (req, next) => {

Does anyone know why this happens?

Accepted Solutions (0)

Answers (0)