Process FlattenedObjectVars behavior last

FlattenedObjectvars returns an incompatible type for a subsequent
behavior:

https://github.com/Icinga/ipl-orm/issues/45
This commit is contained in:
Eric Lippmann 2022-04-11 10:50:38 +02:00 committed by Johannes Meyer
parent bc4cd07a82
commit aeaf1be5bc

View file

@ -36,14 +36,20 @@ class CustomvarFlat extends Model
public function createBehaviors(Behaviors $behaviors)
{
$behaviors->add(new FlattenedObjectVars());
$behaviors->add(new Binary([
'id',
'environment_id',
'customvar_id',
'flatname_checksum'
]));
/**
* TODO(lippserd): Process {@link FlattenedObjectVars} last,
* as it returns an incompatible type for a subsequent behavior:
*
* {@see https://github.com/Icinga/ipl-orm/issues/45}
*/
$behaviors->add(new FlattenedObjectVars());
}
public function createRelations(Relations $relations)