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

Empty field value throws exception #12

Open
binarious opened this issue Jun 25, 2013 · 5 comments
Open

Empty field value throws exception #12

binarious opened this issue Jun 25, 2013 · 5 comments

Comments

@binarious
Copy link

When I want to encrypt an optional field which can be null, I get the following error:

Field "myField" is not a valid field of the entity "XXX\XXXBundle\Entity\MyEntity" in PreUpdateEventArgs.

@westinpigott
Copy link
Contributor

FYI. This does not seem to be an issue with the MongoDB support as Doctrine just removes the offending field.

@binarious
Copy link
Author

@westinpigott, first: +1 for PR #18
The problem occours when you save the entity twice in the same request. Does it work with your MongoDB implementation?

@westinpigott
Copy link
Contributor

I will have to check. You are saying that I need to change a value, flush, change another value on the same document, then flush again, correct?

@westinpigott
Copy link
Contributor

I can't take all the credit for #18. One of my coworkers, @epacetd did most of the hard work and then I refactored.

@josecelano
Copy link

I have the same problem:

Field "myField" is not a valid field of the entity "XXX\XXXBundle\Entity\MyEntity" in PreUpdateEventArgs.

The problem occours when I save another entity in the same request before saving the entity that casuses the problem. The field value is not empty.

I use Doctrine+MySQL.

If I do a test saving the entoty without saving the previous entity (other class) there is no problem.

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

3 participants