Hello,
Just working through the documentation (like what I see (thank you!)) and specifically https://docs.phalcon.io/en/latest/reference/models.html#model-resultsets so first tried:
return EntitiyRole::findFirstById($id);
and that works.
Tried
return EntityRole::find();
And works - I get records back.
Then tried:
return EntityRole::find([
"conditions" => "id = ?1",
"bind" => [
1 => $id
],
"bindTypes" => [Column::BIND_PARAM_INT],
"hydration" => Resultset::HYDRATE_OBJECTS
]);
and my docker console tells me (SIGILL - core dumped)
Tried the object-oriented way:
return EntityRole::query()
->where('id = :id:')
->bind(['id' => 1])
->execute();
core dumped
Tried same idea as documentation:
return EntityRole::find(
[
"type = 'power'"
]
);
I don't get a core dump but I don't get a record back. (Checking my sql logger: SQL syntax is correct and I should get a record back).
So if it is id it REALLY does not like it. If using a syntax other than findFirstByFieldName I don't get a ResultSet back.
Please advise - thank you.