private void addLinkStatement(StatementPrototype sp, ObjectStack propertyStack, Class<?> propertyClass)
	{
		Node objRep = propertyStack.getNode(propertyClass);
		for(ObjectRepresentation rep:propertyStack.getAllRepresentations())
		{
			if(!rep.equals(objRep.getRepresentation()) 
					&& ObjectTools.isA(rep.getRepresentedClass(),propertyClass)
					&& rep.belongsInJoin())
			{
				sp.getIdStatementGenerator().addLinkStatement(objRep.getRepresentation(),rep);
			}
		}
		
		if (objRep.getRepresentation().isArray())
		{
			sp.getIdStatementGenerator().addPropertyTableToJoin(NameGenerator.getArrayTablename(adapter), objRep.getRepresentation().getAsName());
		}
		else
		{
			sp.getIdStatementGenerator().addPropertyTableToJoin(objRep.getRepresentation().getTableName(), objRep.getRepresentation().getAsName());
		}
	}