Answer the question
In order to leave comments, you need to log in
How to handle cases when FK is an empty string?
No idea how such records get into the database and where to look for them.
But any ORM will give an error when getting a connection, for example
"Entity of type 'Test\Entity\DoctrineEntity' for IDs relatedEntityFKID() was not found"
$related = $entity->relatedEntity()
if('' !== $related->id()){
// use $related module, contract
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question