-->
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.  [ 2 posts ] 
Author Message
 Post subject: Mapping fields for indexing...nightmare
PostPosted: Thu Sep 10, 2009 6:41 am 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

I have hit a wall with trying to map our domain model. I orginally had a custom class brigde to handle the mapping but unfortunately I was not on the correct path. The problem is due to the complex model that we have and as a result I am getting a circular reference exception. The models looks like this

Code:
PProject {
-- owner
-- fields
}

RProject extends PProject {
-- RObject
}

@Indexed
LP extends PProject {
@IndexEmbedded
-- Set<BRProject> bps
}

BRProject extends RProject {
@Field
- reference

}


RObject {
@ContainedIn
-- Set<BRProject>

@IndexEmbebbed (This causes a problem..circular reference)
-- Set<WProject> rps
@Field
-- reference
}

WProject extends  RProject {
}


Basically I am trying to index LPProject and create a LPProject lucene document per instance. The problem occurs when I try to index the set of WProjects. I would like to index the owner of WProject and associated data. So when I add the @IndexEmebbed on the set(Set<WProject> rps) in RObject I get the circular reference issue. The only way I think is to index the RObject entity seperately but the downside to this is that I will have to associated it back to the LProject and do a lot of post processing.

I hope this makes sense I've been looking at this problem since yesterday. Any help would be appreciated.

Cheers
Amin


Top
 Profile  
 
 Post subject: Re: Mapping fields for indexing...nightmare
PostPosted: Thu Sep 10, 2009 3:24 pm 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Worked out a solution.

Cheers


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