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

Child Entities based on Contain #8

Open
mwillbanks opened this issue Aug 1, 2013 · 0 comments
Open

Child Entities based on Contain #8

mwillbanks opened this issue Aug 1, 2013 · 0 comments

Comments

@mwillbanks
Copy link
Contributor

So here is a few thoughts on adjusting child entities between contain and contain mapper....

For child selects and/or joins we will need to have the ZendDb driver here. I am thinking that the best solution at this point would be to actually skip the joins and actually do separate selects (while it may be slower for somethings the speed may be negotiable on smaller projects).

The Contain entity definition could then contain in the child entity and/or child entities have options:

  1. mapper - an instance of the mapper
  2. mapper_criteria - the criteria to pass in aka join information an array of columns and values where the values are dynamic.
    • join_id = entity_value

When it is a simple child entity; we do a 1:1 using the findOne method on the mapper.
When it is a multiple child entity; we do a 1:m using the find method on the mapper.

Please let me know if you have any additional thoughts as I would love to incorporate them because I need to do something on this today 👍

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

1 participant