-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
@@ -73,7 +73,7 @@ public function entityToFileObject(EntityInterface $entity): FileInterface | |||
public function fileObjectToEntity(FileInterface $file, ?EntityInterface $entity): EntityInterface | |||
{ | |||
$data = [ | |||
'id' => $file->uuid(), | |||
'id' => $file->uuid(), //FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to set the id for primary key records?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The File object doesn't care, because the whole lib doesn't care about persistance (its not their job) but if you want to persist it and your file path relies on it, then you clearly should set it. The File objects only purpose and reason that it features certain things is that it might need them for generation pathes or doing certain operations in processors.
The File object is like a DTO between persistence that the user has to take core of in his app and the library that only knows about what the file object provides.
@@ -32,13 +32,14 @@ class FileStorageFixture extends TestFixture | |||
'user_id' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 36], | |||
'foreign_key' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 36], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to add another fixture for AIIDs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Closing in favor of #219 |
Refs Phauthentic/file-storage#10
WIP