Skip to content

[WIP] Allow cast_assoc to work inside embeds - #1833

Closed
michalmuskala wants to merge 1 commit into
masterfrom
mm/embed-assoc
Closed

michalmuskala wants to merge 1 commit into
masterfrom
mm/embed-assoc

Conversation

@michalmuskala

Copy link
Copy Markdown
Member

The issue is that embeds don't have the __meta__ field, so we want to
raise only for regular schemas.
This, unfortunately, creates another problem. We don't know if the embed
was just created or loaded from database and needs preloading the
association data. This is very risky to use as it may cause data loss
if used improperly.


The use case for associations inside embeds is NoSQL databases, where this seems like a reasonable thing to do.

If we're going to merge this, we need more tests around this functionality.

The issue is that embeds don't have the __meta__ field, so we want to
raise only for regular schemas.
This, unfortunately, creates another problem. We don't know if the embed
was just created or loaded from database and needs preloading the
association data. This is very risky to use as it may cause data loss
if used improperly.
@josevalim

Copy link
Copy Markdown
Member

Sounds good to me.

@michalmuskala

Copy link
Copy Markdown
Member Author

Closing in favour of the more comprehensible #1837

@michalmuskala
michalmuskala deleted the mm/embed-assoc branch December 7, 2016 17:37
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

Successfully merging this pull request may close these issues.

2 participants