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

Projection, with and array_agg #43

Open
bolbo opened this issue Jul 21, 2015 · 1 comment
Open

Projection, with and array_agg #43

bolbo opened this issue Jul 21, 2015 · 1 comment
Milestone

Comments

@bolbo
Copy link

bolbo commented Jul 21, 2015

Hi,
I have a "vehicule" table. Each vehicule has a collection of element. Each element has a detail in a separate table.

Vehicule

  • vehicule_id
  • label

VehiculeEquipement

  • vehicule_id
  • equipement_id
  • price

Equipement

  • equipement_id
  • euipement_label

To retrieve a vehicule, I have this function: https://gist.github.com/bolbo/0eea9640a5b29c5c8d38
If I remove equipement_label from the projection in the WITH, I have my vehicule.
But with equipement_label, I have a "Notice: Undefined offset: 11".

Can someone help me find the problem ?
Thanks

@chanmix51
Copy link
Member

The problem is similar to embedded entities. There are now ways for now to pass a projection as a type. We need to wrap types in a UnitOfTreatment that would either just be a type or a projection. That will be implemented in 2.1

@chanmix51 chanmix51 added this to the 2.1 milestone Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants