Skip to content

Factory for embeddable classes only working when using "withoutPersisting" #270

@mergeMarc

Description

@mergeMarc

I have multiple embedded classes and factories for those. I get an exception like this when i don't initialize all those factories with 'withoutPersisting()' (in this example ProcessedSms is a embeddable class):

In ORMInvalidArgumentException.php line 63:
                                                                               
  [Doctrine\ORM\ORMInvalidArgumentException]                                   
  The given entity of type 'MyVendor\MyProject\Message\ProcessedSms' (MyVendor\MyProject\Message\ProcessedSms@541)
  has no identity/no id values set. It cannot be added to the identity map.  

Is this intended behavior? I think that #192 says otherwise.
If this is intended behavior it would be nice if the docs would mention having to use withoutPersisting() with embeddables.

Please note that i'm using Foundry for the first time so it could be an issue on my side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions