create a unique composite index on edge class out,in

On Wednesday, May 13, 2015 at 12:01:24 PM UTC+5:30, Matthew Dixon wrote:
>
> Current OrientDB 2.0.8
> Recent update from OrientDB 1.7.8
>
> Having issue adding an edge, something like:
>
> `graph.addEdge(null, vertexA, vertexB, "A_to_B");`
>
> Error is: "Type of field provided in schema 'LINK' can not be used for 
> link creation."
>
> Problem seems to stem from this line:
>
> https://github.com/orientechnologies/orientdb/blob/2.0.x/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java#L134
>
> If isAutoScaleEdgeType() is true this seems to solve my problem, but there 
> are 2 issues.
>
> 1) This custom DB property doesn't seem to stick; it doesn't persist when 
> set as
> `graph.setAutoScaleEdgeType(true);`
> Have to do it on every graph instance. Also, it doesn't pick up on it when 
> I do something like
> `alter database custom autoScaleEdgeType=true`
> Whereas, a different custom property like
> `alter database custom useLightweightEdges=true`
> would work and persist.
>
> 2) As part of my schema, I actually don't want a LINKBAG or for it to 
> auto-scale. I need it to be a 1-1 edge relationship.
> So if isAutoScaleEdgeType() worked, it's still not quite what I am looking 
> for.
> I either want a LINK relationship, or a LINKBAG restricted to size 1 
> somehow, or something similar.
>
> P.S. This is not an issue with orientDB 1.7.8, the git diff showed the 
> additional check was introduced around 2.0-rc1
>
> Any suggestions on how to fix the error?
>
> Thanks
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to