-->
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.  [ 1 post ] 
Author Message
 Post subject: How to compare Map in a List?
PostPosted: Sun Feb 24, 2008 5:26 pm 
Newbie

Joined: Sun Feb 24, 2008 5:12 pm
Posts: 9
Hello everybody ;)
I've got a problem with comparing two objects
I have a class
Code:

@Entity
@Table(name="mytable")
public class Element{
    @JoinTable( name="map_table" )
    @CollectionOfElements(fetch=FetchType.EAGER)
    @Cascade(value = CascadeType.DELETE_ORPHAN)
    @Enumerated(value=EnumType.ORDINAL)
    @MapKey( columns = { @Column( name="myenum" ) } )
    @Column( name="myvalue")
    Map<MyEnum,Integer> someMap;

    @OneToOne
    Element prev;
   
    [...]
}

and i want to compare if prev element's map has same values (and keys)
Is it possible to do it on database side using hql (and how to do it)?

thank you in advance!
Regards


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

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.