Hi. I'm trying to develop a simple 'Not a hello world' app using Hibernate from an existing database and I can't figure out how to manage o/r mapping.
So I have two classes Task and Tag which resemble basic
id and
title fields. In addition Task has a
List<Tag> tags field. Here I need to map
tags field in an auxiliary table. So DB should have three table: TAG, TASK, TASK_TAG. Like this:
Code:
TASK
task_id<<PK>>
task_title
TAG
tag_id<<PK>>
tag_title
TASK_TAG
task_id <<FK>><<PK>>
tag_id <<FK>><<UNIQUE>>
Can any one help me with that issue? I would appreciate any help. Thanks in advance.