-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: CollectionOfElements table structure
PostPosted: Fri Aug 22, 2008 10:18 am 
Newbie

Joined: Thu Aug 21, 2008 6:18 pm
Posts: 1
What the proposed database structure for a relationship of type Set<? extends Enum> ?

I'm trying something like the relationship above:
Code:
@CollectionOfElements
@JoinTable(
   name="TB_AGEN_DIA_SEMA",
   joinColumns={@JoinColumn(name="SQ_OBRI")}
)
public Set<DiaSemanaEnum> getDiaSemana() {
   return diasSemana;
}


But it doesn't work.

I can't find any sample code with CollectionOfElements with Enumerations Java 5 that works. Neither in the hibernate manual.

[]'s


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 25, 2008 5:43 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

here is an example for using @CollectionOfElements and Enums:

Code:
   @CollectionOfElements
   @Enumerated(EnumType.STRING)
   public Set<Character> getCharacters() {
      return characters;
   }


It's from the test code of Hibernate Annotations. Is this what you are after?

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.