How can i map a tagged item? Suppose a new book is added to the system, and this book can be non-fictional and cookery related and poetic etc. So more than one tag is required for the added book. And the tags should be created if it does not already exists. And the tag should not be deleted as i delete the book, coz other books may already get associated with this tag.
So you mean some sort of category entity that the book entity has relationship with? Sounds like a fairly basic data model; books and tags have a many to many relationship, am I right?
So, what are you asking? Are you asking can an ORM tool handle this sort of relationship? Or are you asking what would be ER model look like? Or are you wondering what your object model would look like?
Actually i was trying to implement the same on Grails. And in grails, the domain class mapping is based on ideas got from hibernet. I tried hasmany attribute to establish many to many relationship. But i cant actually make things work by this.
Well, Grails is not an ORM technology per say. But it does use Hibernate, and you do map many-to-many relationships by defining a hasMany on either side of the relationship. Can you show us your code and explain what is going wrong? [ March 07, 2007: Message edited by: Paul Sturrock ]