Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4830

Binding two models / ORM modeling

$
0
0

@midget2000x wrote:

This may be more of a data-modeling question, but…

I am working on a hobby e-commerce project to learn ember. In my app, a customer can check out regardless of whether they set up an account.

If they don’t have an account: they populate the billing and shipping address models via via input

if they DO have an account: billing and shipping addresses need to come from their account user profile (“addresses” being a model with a belongs-to relationship to the “user” model)

The question is, do I COPY the addresses from the user’s address model or do I somehow bind them, perhaps like user.address = shipping.address so that they stay in sync throughout the order?

OR am I approaching the modeling incorrectly?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4830

Trending Articles