Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

JAX-RS, An Object with One-TO-Many - Seeing the 'aggregated' object when fetching XML

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Using JAX-RS, and using RestEasy ( do not think that matters here, or it could matter ....)

Having 2 Entities, Post and Tag
One Post can have many Tag:s

The Post object looks something like this :

The Tag object looks something like this :

When fetching the Post, using the Query, I can see the following - when calling the restful-service:

The question is :
I can see that this actual Post has 2 tags when looking at the code in debug mode.
The relationship is working, I have stuff in my database.

Why can't I see the List with those 2 tags in my XML-feed - The List with tags belongs to the Post-object and should be visible , should not the @XmlRootElement on the tag-object solve this ?

Best regards, Ingo

Uh oh, we're definitely being carded. Here, show him this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic