Hi folks,
So I've got three domain objects that i am returning in a simple CRUD
API. One of them is basically a mapping between the other two. So I
have something like:
@Path("/something/person")
+Person
----Id
----Name
@Path("/something/address")
+Address
----Id
----Street
@Path("/something/personAddressMapping")
PersonAdressMapping
----PersonId
----AddressId
When I get the data back for PersonAddressMapping I want to turn the
ID fields into URL's for Person and Address. What's the best way to
do this? The PersonAddressMapping endpoint doesn't know anything
about the @Path of Person and Address. Is there a way for me to
access that string from PersonAddressMapping? I could hardcode Person
and Address URL's into the mapping class but that doesn't seem like a
great solution. Is there maybe something I could inject that would
allow me access to that info?
Thanks!
Chris