gjrwebber / spring-data-gremlin

Spring data gremlin makes it easier to implement Graph based repositories. This module extends Spring Data to allow support for potentially any Graph database that implements the Tinkerpop Blueprints 2.x API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Always a vertex superclass is V.

kkdatkiran opened this issue · comments

Hi,
I found that "OrientDbSchemaWriter" class is creating the schema for all the entities in the method "createVertexClass", framework is creating the schema with a superclass of type V all the time, no matter what the superclass of the entity is. I have a requirement to use polymorphism in my project.

For example :

@entity
Class BaseEnitty {
}

@entity
Class Audit extends BaseEntity{
@OnetoOne
BaseEntity auditOn;
}

@entity
Class Taxonomy extends BaseEntity{
}

@entity
Class User extends BaseEntity{
}

Now there is no way I can have an edge in Audit either to Taxonomy or User but to a BaseEntity which I will never create.

Can you please help me fix this?

I tried every possible which way to override any classes that you have written to be a part of configuration and still couldn't figure out what or which is triggering the creation of the vertices/entities as a part of the Gremlin Repository creation. It would be a great help for me if you can let me know how to handle this scenario?

this has been solved by kiwigrid#1