-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem with @IndexedEmbedded and @Inheritance
PostPosted: Wed Oct 07, 2009 7:47 am 
Newbie

Joined: Wed Oct 07, 2009 7:34 am
Posts: 12
Im using hibernate search 3.1

Im trying to create an index using @Inheritance.

Principal class:
Code:

@Entity
@Indexed
@Table(name = "iapol.rrhh_solicitud_licencia")
@SequenceGenerator(name = "seq_rrhh_solicitud_licencia", sequenceName = "iapol.seq_rrhh_solicitud_licencia")
public class SolicitudLicenciaEnt implements Serializable, SolicitudLicencia {

   private static final long serialVersionUID = -2831177010189116163L;

   @Id
   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_rrhh_solicitud_licencia")
   @Column(name = "id", nullable = false)
   private Long id;

@IndexedEmbedded
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "id_usuario", nullable = false)
   public AgenteEnt agente;

.......
getters and setters
.......
}


extended Class agenteEnt
Code:

@Entity
@Table(name = "iapol.per_agentes")
@Inheritance(strategy = InheritanceType.JOINED)
public class AgenteEnt extends UsuarioEnt implements Agente, Serializable {
......
......
......
}



Base classs
Code:

@Entity
@Table(name = "iapol.per_usuario")
@Inheritance(strategy = InheritanceType.JOINED)
@SequenceGenerator(name = "per_sq_usuario", sequenceName = "iapol.per_sq_usuario")
public class UsuarioEnt implements Usuario, Serializable {

   private static final long serialVersionUID = 3570278684052360798L;

   @Id
   @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "per_sq_usuario")
@Column(name = "id", nullable = false)
   protected Long id;

@Field(index = Index.TOKENIZED, store = Store.NO)
   @FieldBridge(impl = StringTildesBridge.class)
        @Column(name = "username", nullable = false, unique = true)
   protected String username;

..........
............
.................


No index is create when I try to create principal class index (solicitudLicenciaEnt index). agente.username is no getting indexed


Top
 Profile  
 
 Post subject: Re: Problem with @IndexedEmbedded and @Inheritance
PostPosted: Wed Oct 07, 2009 10:24 am 
Newbie

Joined: Wed Oct 07, 2009 7:34 am
Posts: 12
Exception while trying to create the index:

16:28:46,314 ERROR JDBCTransaction:246 - exception calling user Synchronization
org.hibernate.annotations.common.AssertionFailure: Access a Sealed WorkQueue which has not been sealed


Top
 Profile  
 
 Post subject: Re: Problem with @IndexedEmbedded and @Inheritance
PostPosted: Wed Oct 07, 2009 10:43 am 
Newbie

Joined: Wed Oct 07, 2009 7:34 am
Posts: 12
Problem solved.
Someone of my worgroup altered DataBase, but didnt make that changes on the hibernate mapping.....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.