-->
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.  [ 8 posts ] 
Author Message
 Post subject: @IndexedEmbedded only working with one collection
PostPosted: Tue Jul 15, 2008 10:50 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
class A{
@ManyToOne(fetch=FetchType.LAZY)
@IndexedEmbedded( depth = 5 )
private B b;

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "x")
@IndexedEmbedded( depth = 4 )
private C c;
}


Nothing is picked up for C and I know there are entries for this.

Hibernate Search has really been giving me a lot of grief :(


Last edited by samd on Wed Jul 16, 2008 5:04 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 2:45 am 
Hibernate Team
Hibernate Team

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

Could it be a configuration error? Shouldn't your @OneToMany annotation point to a collection or array?

Also have a look at the troubleshooting guide: http://hibernate.org/440.html.

If you need more help you could maybe post your annotated classes.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 12:02 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
I was just using that for an example. It is actually pointing to a collection.

My annotated class is enormous. Unfortunately I'm trying to integrate this with an existing system and not starting from scratch.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 4:48 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
Just confirmed it. In my above case if I comment out the @IndexedEmbedded on my @ManyToOne the following @OneToMany will be picked up in the index.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 5:07 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
Correction this did not happen I still don't see my second collection.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 16, 2008 9:02 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
Anyone? This pretty much makes Hibernate Search useless if I can't have more then one @IndexedEmbedded collection within an Entity.

Here are the two annotated methods with real names replaced by X and Y

@Embedded
@ManyToOne( fetch = FetchType.LAZY )
@JoinColumns( { @JoinColumn( nullable = false, name = "X", referencedColumnName = "X" ),
@JoinColumn( nullable = false, name = "X", referencedColumnName = "X" ) } )
@NotNull
@IndexedEmbedded( depth = 999 )
public X getX()
{
return this.x;
}

@OneToMany( cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "Y" )
@IndexedEmbedded( depth = 999 )
public Set<Y> getY()
{
return this.Y;
}

As I mentioned only X shows up in the index Y is nowhere. If I comment out X then Y will show up.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 20, 2008 9:04 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
So nobody has any ideas on this one?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 21, 2008 8:08 pm 
Regular
Regular

Joined: Fri Oct 05, 2007 3:22 am
Posts: 69
I figured this out, these forums aren't very helpful most of the time I find.

Here is the JIRA I opened:
http://opensource.atlassian.com/project ... tion_30704

Basically to sum it up HS can't deal with entities which aren't found during indexing.


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