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

F/aftersetattributes event#41

Open
mrbig wants to merge 1 commit into
canni:develfrom
mrbig:f/aftersetattributes_event
Open

F/aftersetattributes event#41
mrbig wants to merge 1 commit into
canni:develfrom
mrbig:f/aftersetattributes_event

Conversation

@mrbig

@mrbig mrbig commented May 20, 2011

Copy link
Copy Markdown

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