Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

F/aftersetattributes event #41

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

mrbig
Copy link

@mrbig mrbig commented May 20, 2011

Hi!

Yet another refactor to the EEmbeddedArraysBehavior. The behavior did not work on embedded documents: it tried to load the attributes before the setAttributes was called.

Now EMongoEmbeddedDocument raises a new event called afterSetAttributes. This
is raised after the attributes of the document have been set.

EEmbeddedArraysBehavior changed to populate the items on this event. This
makes it more robust when attached to embedded documents.

I'll add some testcases for this in the test suite hopefully in a few days. This fix has been tested on out project that has many different use of the EmbeddedArraysBehavior, and didn't brake anything, so seems safe to me.

EMongoEmbeddedDocument raises a new event called afterSetAttributes. This
is raised after the attributes of the document have been set.

EEmbeddedArraysBehavior changed to populate the items on this event. This
makes it more robust when attached to embedded documents.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant