getoutreach / epf

A framework for keeping your Ember.js apps in sync.
http://epf.io
MIT License
369 stars 33 forks source link

EPF No longer generating children - Ember1.0 #87

Closed unr closed 11 years ago

unr commented 11 years ago

Hey guys,

Ember finally seems to have upgraded to 1.0 - and as such we've upgraded our application. After doing so, EPF seems to no longer automatically create child objects.

We have two models:

App.Project
    phases: Ep.hasMany(App.Phase)

App.Phase
    project: Ep.belongsTo(App.Project)

As well, in our adapter, we have:

Ep.RestAdapter.map( App.Project, {
    phases: {embedded: 'always'}
})

Ep.RestAdapter.map( App.Phase, {
    project: {embedded: 'always' }
})

Previously, when using EmberRC6 - calling @session.query('projects') would build the list of projects, as well as the child phases.

After upgrading, it no longer automatically creates the child phases.

If I call App.Phase.find(1) while viewing my list of projects, it will create the phase and it will now show inline. Why does this not automatically happen anymore?

Any thoughts on how to get around this?

ghempton commented 11 years ago

I am planning on bringing EPF up to 1.0 today.

unr commented 11 years ago

Cheers! Looking forward to the update.

unr commented 11 years ago

Let me know if there's anything we can do to help bring EPF up to 1.0

unr commented 11 years ago

@ghempton Great to see the 1.0 update pushed out so fast. After updating our bower dependancy, and running the build, I'm getting an odd error.

It's telling me that Ep.RestAdapter has no method map. Therefore, can't do any of my Ep.RestAdapter.map() for embedded:always.

Any thoughts on why?

edit: Going through your commit history, I see you've removed the Mappable mixin - and switched to using this.configs.

However, can't figure out what sort of convention to be using in the configs property. Halp?

unr commented 11 years ago

And, closing this ticket now. I've found out you can set it up using:

App.ProjectSerializer = Ep.RestSerializer.extend
    properties:
        phases: {embedded: 'always'}

Again, thanks for updating so quickly.

ghempton commented 11 years ago

Glad you found that out! I am going to create a guides sections soon.