Reputation: 849
I'm having some problems with my associations. I have 3 Models: User, Membership, Company. A user may (or may not) have a company/membership. Here's a pastebin of my models:
2 questions I have:
Upvotes: 2
Views: 909
Reputation: 21743
This is normal for BelongsTo/HasOne Relations. As they are on the same level as your primary record. Only HasMany/Habtm relations will result in an empty sub array (since those would be an array of arrays). That is mainly due to the way the array structure is returned.
And yes, your model relations look fine to me.
Upvotes: 5