fixed MatchClauseUnitTest

This commit is contained in:
Michael Hunger
2011-09-23 02:04:43 +02:00
parent 73cf0ce8d5
commit 05996a3480
2 changed files with 5 additions and 3 deletions

View File

@@ -55,9 +55,10 @@ public class RelationshipInfo {
}
private boolean isNodeEntity(TypeInformation<?> targetType) {
if (targetType.getType().isAnnotationPresent(NodeEntity.class)) return true;
if (targetType.getType().isAnnotationPresent(RelationshipEntity.class)) return false;
throw new MappingException("Target type for relationship "+ type +" field is invalid "+targetType);
final Class<?> type = targetType.getType();
if (type.isAnnotationPresent(NodeEntity.class)) return true;
if (type.isAnnotationPresent(RelationshipEntity.class)) return false;
throw new MappingException("Target type for relationship "+ this.type +" field is invalid "+type);
}
public static RelationshipInfo fromField(Field field, TypeInformation<?> typeInformation) {

View File

@@ -76,6 +76,7 @@ public class MatchClauseUnitTest {
private Group group;
}
@NodeEntity
class Group {
@Indexed