fixed issues with join/secondary tables in orientdb; only queries now left for impl