I'm having an issue with JPA and I'm hoping someone can help me out. As
part of the object model restructure we are splitting some of the object
dependencies and replacing them with IDs. For example, we are breaking the
link between WidgetTag and Tag and having WidgetTag have a TagID. This
means that when a new WidgetTag is created the system needs to create the
new Tag object if it doesn't exist, get it's ID and then save the WidgetTag
with the TagID. My problem is that when I create a new Tag and call
TagRepository.save(tag), it "saves" but when it returns the Tag object it
doesn't container an ID, but it's now a JPATag object. Is there a way to
resolve that or do we need to do a save, then a get to return a fully
populated object?

Chris

Reply via email to