diff --git a/structr-core/src/main/java/org/structr/core/parser/Functions.java b/structr-core/src/main/java/org/structr/core/parser/Functions.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/core/parser/Functions.java
+++ b/structr-core/src/main/java/org/structr/core/parser/Functions.java
@@ -2983,8 +2983,15 @@ public class Functions {
 						if (relClass == null) {
 							return false;
 						}
+
+						for (final AbstractRelationship rel : sourceNode.getOutgoingRelationships()) {
+
+							if (rel.getProperty(AbstractRelationship.relType).equals(relType) && rel.getTargetNode().equals(targetNode)) {
+								return true;
+							}
+						}
 						
-						return sourceNode.hasRelationship(relClass);
+						return false;
 
 					}
Fixed has_relationship() function to work properly with third argument (rel type)