[hibernate-dev] [OGM] Inheritance mapping in Neo4j

Sanne Grinovero sanne at hibernate.org
Thu Nov 17 08:30:23 EST 2016


Hi, it makes sense but I don't think we can change the mapping now.

Could you do it as a new option? Would you be able to adjust the
queries as needed?

If you can make it a configuration property, default to the old style
mapping, and log a warning of using a deprecated mapping when the old
one is being used. This implies that people not choosing any mapping
style explicitly will see a warning (as the old one would still be the
default).

Thanks,
Sanne

On 16 November 2016 at 12:42, Davide D'Alto <davide at hibernate.org> wrote:
> A user created the issue https://hibernate.atlassian.net/browse/OGM-1210
>
> The problem is that when we use the SingleTable strategy in Neo4j  we
> add a property DTYPE to the node to discriminate the entities instead
> of using labels.
>
> As an example, given an entity Player that extends Person we create:
>
> (n:Person {DTYPE: Player})
>
> instead of having a node with two labels:
>
> (n:Person:Player)
>
> I think the mapping with multiple labels is more natural than the one
> we currently have.
>
> I was wondering if we should fix this for the next release, the
> problem is that I would need additional information in one of our
> .spi.*Context and it will change the mapping.
>
> The next release should be 5.1.Beta2
>
> What do you think?
>
> Thanks,
> Davide
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list