Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve ManyToOne id conversion

  • Loading branch information...
commit 5fea37b39ff3b5133f3cf05761c81e92808f9723 1 parent c6f5664
Jean-Francois POUX authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/play/modules/search/store/ConvertionUtils.java
View
3  src/play/modules/search/store/ConvertionUtils.java
@@ -3,6 +3,7 @@
import java.util.Collection;
import javax.persistence.Id;
+import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import org.apache.lucene.document.Document;
@@ -89,7 +90,7 @@ public static String valueOf(Object object, java.lang.reflect.Field field) throw
}
Object o = field.get(object);
- if (o instanceof JPASupport) {
+ if (field.isAnnotationPresent(ManyToOne.class) && o instanceof JPASupport) {
return "" + getIdValueFor((JPASupport) o);
}
Please sign in to comment.
Something went wrong with that request. Please try again.