I need clarification about the behaviour of from and fromUnfiltered when using planningEntities with nullable variables in Optaplanner.
The user documentation states that
The .from(T) building block selects every T instance that is in a problem fact collection or a planning entity collection and has no null planning variables.
To include instances with a null planning variable, especially if you use nullable variables, replace the from() building block by fromUnfiltered():
But the java doc of from methods states that from method will filter entities with null variables except if it's a nullable variable:
Start a ConstraintStream of all instances of the fromClass that are known as problem facts or planning entities.
If the fromClass is a PlanningEntity, then it will be automatically filtered to only contain fully initialized entities, for which each genuine PlanningVariable (of the fromClass or a superclass thereof) is initialized (so when the value is not null - unless PlanningVariable.nullable() is modified). This filtering will NOT automatically apply to genuine planning variables of subclass planning entities of the fromClass.
I'm not sure if my understanding is correct, and my tests show that javadoc is correct, and user documentation is misleading. Or perhaps I'm missing the point.
Anyone to clarify?