• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

quick question: element of set -> annotation

 
Justin Wu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a file Person.hbm.xml. It has :

<set name="emailAddresses" table="PERSON_EMAIL_ADDR">
<key column="PERSON_ID"/>
<element type="string" column="EMAIL_ADDR"/>
</set>

The person class has :

public class Person {
...
private Set<String> emailAddresses = new HashSet<String>();
...}

Now I want use annotation to express it. I found that all examples use customized class to contain it's child table. But now it is only a STRING. How do I do? Thanks.

[ June 09, 2008: Message edited by: Justin Wu ]

[ June 10, 2008: Message edited by: Justin Wu ]
[ June 10, 2008: Message edited by: Justin Wu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic