Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store a Domain from another context #15

Open
ElGigi opened this issue Apr 30, 2019 · 2 comments
Open

Store a Domain from another context #15

ElGigi opened this issue Apr 30, 2019 · 2 comments

Comments

@ElGigi
Copy link
Contributor

ElGigi commented Apr 30, 2019

Hi,

In method \Atlas\Transit\Handler\EntityHandler::updateSource(), it's checked if the domain object exists in storage and if no, Transit do an INSERT to the database instead of UPDATE.
But if we save the Domain object in session for example, and store/persist in another context, Transit do an INSERT and thrown an exception for duplicate entry (because the domain doesn't not getted in the same context).

How do an update of a domain getted from another context?

Thanks.

@froschdesign
Copy link

@ElGigi
Same here: Can you provide an unit test that illustrates the problem? Otherwise, it will be hard to understand what the problem might be.

@ElGigi
Copy link
Contributor Author

ElGigi commented May 2, 2019

@froschdesign
I developed the functionality in pull request: #16

To understand, the similarity with Doctrine: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/cookbook/entities-in-session.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants