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

Grocery-Department relation #11

Open
nadaa opened this issue Jan 12, 2019 · 6 comments
Open

Grocery-Department relation #11

nadaa opened this issue Jan 12, 2019 · 6 comments
Assignees

Comments

@nadaa
Copy link
Contributor

nadaa commented Jan 12, 2019

It is many-many, right?
is the id_1 in Grocery table refer to department_id?

@atherdon
Copy link
Member

one grocery list has many departments.

maybe we'll change something in future, but for now it's ok relation

@nadaa
Copy link
Contributor Author

nadaa commented Jan 17, 2019

I think we need to add grocery_id to the department?

@atherdon
Copy link
Member

What if department are not attached to any of grocery lists? not agree.
assume that we have a department Dairy.
and your grocery list has it
When i create a brand new list and create a Diary department - then we'll have 2 Diary at deparment database with just different grocery_id`s?

Give me more details. What do you trying to do or what method are you trying to build

@nadaa
Copy link
Contributor Author

nadaa commented Jan 17, 2019

I am trying to understand the db relations, so I can reflect the same on graphql.
Does it matter to know what departments a groceryist includes?

@atherdon
Copy link
Member

I understand. it's not an easy question. Let's do a quick way - grocery object should have an array with departments.

Btw, maybe this visual will help a bit: https://github.com/GroceriStar/creative/blob/master/fetch-examples/readme.md

@atherdon
Copy link
Member

atherdon commented Feb 3, 2019

we made some updates in our static-data repository and also add some new methods to this project. Buzz me when you'll have time - i want to explain what we actually did and how it can help you

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

No branches or pull requests

2 participants