> On May 31, 2016, at 3:08 AM, Tilmann Zäschke <[email protected]> wrote: > > Hi, > >> More likely the problem is down to having a field as Optional<Object> > > The test doesn't actually have Optional<Object>, but it does have: > > Optional<?> optionalAny; > Optional optionalNoGenerics; > > I suppose these would not be allowed either (because they are mostly > equivalent to Optional<Object>)?
Yes. Optional<?> and Optional are not of much interest (to me at least). I agree with Andy that supporting Object in an object model should be sufficiently flexible. Optional<Object> does not add any value to the model. In plain English, "Object can be any object. Optional<Object> can be anything but with some special behavior about nullability"??? Craig > > Regards, > Tilmann > > On 31-May-16 11:53, Andy Jefferson wrote: >> Hi, >>> thanks. Indeed it seems that the error is triggered by declaring a field >>> as 'Optional'. >> That I doubt, due to established tests >> https://github.com/datanucleus/tests/blob/master/jdo/general/src/test/org/datanucleus/tests/types/OptionalTest.java >> >> >> More likely the problem is down to having a field as Optional<Object>, which >> is a minority interest use-case IMHO (which can often be symptomatic of a >> problem in a model, with lack of use of inheritance etc). Perhaps try >> nightly builds of jars if having problems. >> >>> Next step is likely to update the implementation. >> DataNucleus has supported Optional since 5.0.0-m1, and tested on >> Optional<{basic}>, Optional<PC> (see link). It hasn't been tested on >> Optional<Object> where Object refers to potentially multiple types of PC. >> >> >> >> Regards > > Craig L Russell Architect [email protected] P.S. A good JDO? O, Gasp!
