carnival-data / carnival

JVM property graph data unification framework
https://carnival-data.github.io/carnival/
GNU General Public License v3.0
7 stars 2 forks source link

Add all properties of a PropertyDefinition class to a Vertex Definition #64

Closed augustearth closed 2 years ago

augustearth commented 2 years ago

Currently, we have to do something like this to define a minimal graph model:

class GraphModel {

    @VertexDefinition
    static enum VX {
        VERTEXDEF(
            propertyDefs:[
                PX.PROPERTY1,
                PX.PROPERTY2,
                PX.PROPERTY3
            ]
        )

    }

    @PropertyDefinition
    static enum PX {
        PROPERTY1,
        PROPERTY2,
        PROPERTY3,
    }

}

Why can't we do something like:

class GraphModel {

    @VertexDefinition
    static enum VX {
        VERTEXDEF(PX)
    }

    @PropertyDefinition
    static enum PX {
        PROPERTY1,
        PROPERTY2,
        PROPERTY3,
    }

}