Fixed
Details
Assignee
Sanne GrinoveroSanne GrinoveroReporter
Marc SchipperheynMarc SchipperheynFix versions
Affects versions
Priority
Major
Details
Details
Assignee
Sanne Grinovero
Sanne GrinoveroReporter
Marc Schipperheyn
Marc SchipperheynFix versions
Affects versions
Priority
Created January 29, 2015 at 3:34 AM
Updated October 31, 2017 at 12:33 PM
Resolved March 3, 2015 at 10:25 AM
Before HSearch 5 projecting on post.id returned a long. Now it returns a string. It might because the @Field approach I use is no longer valid. Please advise.
public class WallPost{ @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "postId", updatable = false, insertable = false) //Storing the id to deal with https://blog.trifork.com/2012/01/22/query-time-joining-in-lucene/ @Field(name="baseCommentId",index=Index.YES,store=Store.YES,analyze=Analyze.NO,bridge=@FieldBridge(impl=LongBridge.class)) @DocumentId public Long getId() { return id; } @ManyToOne(fetch=FetchType.LAZY,optional=true) @JoinColumn(name="FK_PostId",nullable=true,insertable=true,updatable=false) @IndexedEmbedded(includePaths={"id","type","baseCommentId"},indexNullAs=Field.DEFAULT_NULL_TOKEN) @ContainedIn public WallPost getPost() { return post; }
.createFullTextQuery( mj.createQuery(), WallPost.class) .setProjection(ProjectionConstants.ID, "post.id")