I have class with collection like:
and in view
this works for entity, but can I do i with some selected columns from native query, like:
List myList = em.createNativeQuery("SELECT object.A, object.B");
and add this list to @DataModel?
So what should be as datamodelSelection?
this wil work?
How can i create list with some objects and select current object from list?
I believe that the @DataModel annotation should work with any kind of object, entities or not regardless of where the list came from. In theory anyways!
The datamodelselection member should probably be of the lowest type on the object hierarchy. If you have completely unrelated object types, then yes, Object is probably the best type.