-->
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: hibernate search indexing a subclass to nonindex base
PostPosted: Tue Jul 22, 2008 7:58 pm 
Regular
Regular

Joined: Tue Apr 01, 2008 5:39 pm
Posts: 61
3.0.0 GA
3.2.6 GA

So i have a basic problem.

I have a class A.java

its plain old A.hbm.xml and A.java


than i have another class call B.java and B.hbm.xml

1.) and i want to do hibernate search index on that (if i extend A), and A is not index well B index include information from A.


2.) If i have A included in B via as a property.

B.getA()
B.setA(A a);

And i say indexEmbedded will it be able to index A even though A is never index from hibernate search.


Cause the problem is that I don't want all the class annotated. I only want the subclass and some of it annotated.


Top
 Profile  
 
 Post subject: Re: hibernate search indexing a subclass to nonindex base
PostPosted: Wed Jul 23, 2008 4:03 am 
Hibernate Team
Hibernate Team

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

I am not sure I understand your questions correctly, but I will try:

cablepuff wrote:
1.) and i want to do hibernate search index on that (if i extend A), and A is not index well B index include information from A.

No, only properties which are annotated with @Field are indexed. So if class B extends class A and only class B is annotated with @Indexed, only the fields within B which are annotated with @Field will get indexed.

cablepuff wrote:
2.) If i have A included in B via as a property.

B.getA()
B.setA(A a);

And i say indexEmbedded will it be able to index A even though A is never index from hibernate search.

Yes, you will be able to index A. For example you could have a @OneToOne mapping from class B to A. If you then also add @IndexEmbedded you get the behavior you are after.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 03, 2008 10:26 am 
Regular
Regular

Joined: Tue Apr 01, 2008 5:39 pm
Posts: 61
thanks. however i have it in hbm.xml

<property name = "A" class ="A" column = "A_COLUMN"/>

how would hte generated column look like,.


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.