Add ODM embedded-like functionality #419

Closed
wants to merge 25 commits into
from

Conversation

Projects
None yet
2 participants
@djlambert

This PR adds ODM embedded-like functionality to the ORM.

Including the new @mappedassociation annotation on a field having a one-to-one association adds a discriminator column to the table for storing the class name of a "mapped" entity.

This allows a class or mapped superclass with a one-to-one identifying association to be extended by additional entities without requiring any code changes (as is required with the discriminator map when using inheritance).

I apologize if this is the incorrect way to submit a feature request. Currently just the annotation driver has been updated, I wanted to get feedback before continuing with the remaining drivers. Models and tests are included.

djlambert added some commits Aug 7, 2012

Added method addMappedAssociationDiscriminatorColumnDefinitions to ad…
…d mapped association descriminator columns to the table.
Added method _getSelectMappedAssociationDiscriminatorColumnSQL to get…
… mapped association discriminator column SELECT SQL.
Add mapped association descriminator columns to select list. If mappe…
…d association is a mapped superclass add to array to skip association.
@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 7, 2012

This pull request passes (merged e7fa8a3 into 72ce9a7).

This pull request passes (merged e7fa8a3 into 72ce9a7).

@djlambert

This comment has been minimized.

Show comment Hide comment
@djlambert

djlambert Aug 30, 2012

With support for dynamically generating the discriminator map added in #221 I'm able to accomplish similar results using class table inheritance.

With support for dynamically generating the discriminator map added in #221 I'm able to accomplish similar results using class table inheritance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment