java - Spring-Data-Neo4J Class Polymorphism -
sdn v3.0.0 release neo4j community 2.0.1
i'm having bit of issue regards inheritance , collections. perhaps assist matter. have following structure.
public abstract class graphic; public class shape1 extends graphic; public class shape2 extends graphic; public class shape3 extends graphic; public class overlay { set<graphic> graphics; } public interface graphicsrepository extends graphrepository<graphic>{}
i can persist graphics using graphic repository , various attributes stored correctly based on concrete classes. can query , individual graphics correct attributes, , various things associate classes in neo4j "portal" environment. when retrieve on overlay ever base class graphic class type within collection , casting not work. overlooking or not doing correctly, figured post , see if there suggest. i've searched google , stack overflow , have ever found similar issues main class , never internal collection of objects.
also, when remove abstract graphic class same results⦠items in overlay graphics set of type graphic. , adding @typealias not seem help.
thanks
ok, found issue… kind of feel foolish forgot put @fetch on graphic collection. strangely enough retrieve graphic objects of type graphic. when added fetch collection, collection items retrieved correct type.
Comments
Post a Comment