Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-04-2018 02:02 AM
I have a stored procedure with the return type Stream<AbstractClass>
.
Depending on a boolean
parameter input value the return class is either ExtendedFromAbstractClass1
or ExtendedFromAbstractClass2
.
Only the attributes contained in the AbstractClass
are present in the output but none of the ExtendedFromAbstractClass1
or ExtendedFromAbstractClass2
attributes.
Is there a way that extended class attributes are also contained in the output?
09-04-2018 03:26 AM
Unfortunately the current implementation of the procedures API doesn't look at inherited attributes.
So for now you'd have to copy those into the concrete classed. Sorry for that.
09-04-2018 07:35 AM
This means that, currently, the only workaround is to implement two separate functions:
Stream<ExtendedFromAbstractClass1>
first functionStream<ExtendedFromAbstractClass2>
second functioninstead of being able to use the parameter?
09-04-2018 07:58 AM
You cannot have parameterized return types for the same procedure anyway.
It has to be a concrete class b/c the output fields are generated for that at load-time not runtime.
All the sessions of the conference are now available online