ResultClass cannot inherit class with same field names?


ebenzacar@...
 
Edited

Hi,

 

I'm not sure if this is a bug or by design.  I have raised an issue in the Datanucleus-rdbms project at https://github.com/datanucleus/datanucleus-rdbms/issues/384, but not sure which forum is better suited to discuss the finding(s).

I noticed that when specifying a ResultClass in an SQL query, if the ResultClass extends a base class with a same-name field, an exception is thrown.  However, the exception message is misleading:

Result Class query field names are not case sensitive. It does not allow fields with same name, but in a different case. For instance, the field "name" is conflicting.
org.datanucleus.exceptions.NucleusUserException: Result Class query field names are not case sensitive. It does not allow fields with same name, but in a different case. For instance, the field "name" is conflicting.
From the exception, I would expect that fields with the same name, and the same case are permitted.  However, this indicates otherwise.
Is this a bug or by design?  If a bug, I have submitted a proposed PR to resolve the issue.


Thanks,
 
Eric