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

Association ManyToMany #52

Open
SebHoremans opened this issue Apr 21, 2017 · 10 comments
Open

Association ManyToMany #52

SebHoremans opened this issue Apr 21, 2017 · 10 comments

Comments

@SebHoremans
Copy link

SebHoremans commented Apr 21, 2017

Hi,
Is there a method to force the route to get/set the many to many associations.

For example I got a user entity and a site entity. These two has a many to many relationship :
Users Has Sites and Sites Has Users.

How can i get these relation by a standard REST path such as :
/users/{id}/sites
and/or
/sites/{id}/users

Thanks

@SebHoremans
Copy link
Author

A small re-up because this problem stopped our project for now.
Thanks

@TobiasHauck
Copy link
Member

What exactly happens using a many to many relation? I think it should work as expected. If not I think this is an easy one. May you provide some more information? Thanks!

@SebHoremans
Copy link
Author

SebHoremans commented May 8, 2017

Yes in fact the url call by the driver to get the sites for a specific user is

GET http://localhost:8000/sites?t_user_has_site_uhs.uhs_user_id=1

But I would like to tell the driver that the correct url is :

GET http://localhost:8000/users/1/sites

@TobiasHauck
Copy link
Member

Ok got you. This should be supported. I will have a look in a few hours.

@SebHoremans
Copy link
Author

Wonderful !

@TobiasHauck
Copy link
Member

After playing with what I've built so far I know what's going wrong / what needs to be done.

We need another annotation which configures joined properties.

I try to work on that the next days

@SebHoremans
Copy link
Author

Thanks a lot If you need some validation or help please let me know.

@donjuandem
Copy link

@SebHoremans
Copy link
Author

Hello,
@TobiasHauck have you ever been able to take the time to look at this point ?

Have you ever been able to take the time to look at this.
I would like to help you, but I do not know how I can do it.

@TobiasHauck
Copy link
Member

Hey Seb,

indeed I had no time to have a deeper look at this. Maybe we should have a chat on Skype. You can send me your nick name via email which you can find on my public Github profile. See you soon and thank you for your help!!

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

3 participants