object « Property « JPA Q&A





1. Implement same property for different objects    forum.hibernate.org

Hello I've got object "Folder" and object "Note". This objects can be moved to trash. What is the best practive to implement this functionality? objects "Folder" and "Note" have different tables. Should I add column to tables or make new table that will store links to removed folders and notes... Any other suggetions?

2. several object as property    forum.hibernate.org

ok, i've seen you coul have an object as property, which should be persistent with two columns for id and classname of the object! (we try this but in moment there were no database entries and no error messages too) but what is, when the object is a String, the String has no id.. ?

3. property=Object.getAtribute?    forum.hibernate.org

Hi guys, how would you solve this: class MyClass { MyObject myobject; } class MyObject { private Integer integerAttrib; } I have a table with int atribute: I want to tell hibernate: