Hello,
who can help : i have the code below :
my request is :
if niss is duplicate => stop
or if firstName and lastName is duplicate => maybe continue.
Regards
PS : this code result as "Duplicate 409 error" when add "teams" to the record.. :s
who can help : i have the code below :
my request is :
if niss is duplicate => stop
or if firstName and lastName is duplicate => maybe continue.
Regards
PHP Code:
protected function getDuplicateWhereClause(Entity $entity, $data)
{
$data = [
'OR' => [
[
'firstName' => $entity->get('firstName'),
'lastName' => $entity->get('lastName'),
],
[
'niss' => $entity->get('niss'),
],
],
];
return $data;
}
PS : this code result as "Duplicate 409 error" when add "teams" to the record.. :s