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

TradeItem needs concrete relationship to TradeElement #91

Open
jMyles opened this issue Jun 26, 2012 · 0 comments
Open

TradeItem needs concrete relationship to TradeElement #91

jMyles opened this issue Jun 26, 2012 · 0 comments

Comments

@jMyles
Copy link
Member

jMyles commented Jun 26, 2012

Currently, this comment explains our position on the matter:

You'd think relating to element would be, well, elemental.
But it turns out not to be. Instead, we have literal and ethereal versions
of our products and services as subclasses, and then get down with one another directly.

This is an interesting concept, but there's obviously no way to enforce the underlying relationship. It also makes it difficult to instantiate a RealThing that doesn't belong to a subclass - are we taking the position that every RealThing is a sublcass (ie, a Product or Service or Ingredient or...?)

Even if this is so, we can use django-model-utils to ensure that we get a clean drill down. We'll need to use a join either way, so why not have one field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant