-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Milestone
Description
When I generate DAOs, in files like Abstract (no editable), DAO can generate function findOneBy .. like this for example in AbstractDocumentTypeDao :
/**
* Get a DocumentType filtered by whiteLabel, documentModels.
*
* @param WhiteLabel $whiteLabel
* @param DocumentModel $documentModels
* @param string[] $additionalTablesFetch A list of additional tables to fetch (for performance improvement)
* @return DocumentType|null
*/
public function findOneByWhiteLabelAndDocumentModels(WhiteLabel $whiteLabel, ?DocumentModel $documentModels = null, array $additionalTablesFetch = array()) : ?DocumentType
{
$filter = [
'white_label_id' => $whiteLabel->getId(),
'document_models_id' => ($documentModels !== null) ? $documentModels->getId() : null,
];
return $this->findOne($filter, [], $additionalTablesFetch);
}
In my schema DB, white_label_id and document_models_id are NOT NULL
So, second params should not be an optional parameter.
Can it be corrected? Thank you
moufmouf
Metadata
Metadata
Assignees
Labels
No labels