You might find easier to use select new com.mypackage.MyBean(o.periodEnd, o.portfolioItem.portfolio) from ...
This way you handle a class of your own with getters of the correct type, not an Object[].
You might find easier to use select new com.mypackage.MyBean(o.periodEnd, o.portfolioItem.portfolio) from ...
This way you handle a class of your own with getters of the correct type, not an Object[].