Feature/user example

Implementing arch changes.

Do not merge yet. Work in progress.
Yep, that's being handled somewhere else.

In doctrine, when results are lazy loaded (this is the default), the
collection holds all the identifiers without initializing the objects. So
there's no need for the extra properties, instead this is handled in the
serialization strategy and doctrine options by selecting eager vs lazy.

http://jmsyst.com/libs/serializer/master/reference/annotations
https://stackoverflow.com/questions/6939339/in-doctrine-2-can-the-fetch-mode-eager-lazy-etc-be-changed-at-runtime

That way the simple model won't have to be concerned with one particular
implementation and will only be concerned with its own relationships. The
serialization takes care of creating the interface that maps to what is
being consumed.


--
*Victor Passapera*
*Software Architect*


On Thu, Sep 18, 2014 at 10:59 AM, Jonathan Johnson <notifications@github.com
> wrote:

> In sfi/src/Ilios/CoreBundle/Resources/config/serializer/Entity.User.yml:
>
> > @@ -25,10 +25,3 @@ Ilios\CoreBundle\Entity\User:
> >              serialized_name: campusId
> >          otherId:
> >              expose: true
> > -    virtual_properties:
> > -        getPrimarySchoolId:
> > -            serialized_name: primarySchool
> > -            type: integer
> > -        getOfferingIds:
> > -            serialized_name: offerings
> > -            type: array
>
> Why did you pull these out? Our api needs to return array lists of ids and
> not actual json entities for each relationship. Did this functionality get
> put somewhere else?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ilios/ilios/pull/694/files#r17743597>.
>