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