Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Before all: sorry for poor format, but on my 3" screen mobile write e is a pain...) <br/> IMO the problem is that your entity is composed only by the id. Hibernate probably fetch id during query and found a valid numbers of objects (your list size) but when is time to convert id to mapped entity during dehydrating, it run into problem fetching real data and building up your entity (maybe hibernate is getting other properties excluding those are part of id and run into a sort of select null from table where id-fields = prefetched id - just an idea; this is why you get a list filled of nulls). If you can reconsider your composite-id or try to add more properties to entity. Hope can help to solve or point to solution. Hibernate tools sometimes generate weird mappings... Else working with native query, addScalar() (instead of addEntity) and an aliastobean resulttransformer can be a work-around (If you are mapping a readonly view this can be resonable) </p> <p>Using SQLQuery:<br/></p> <p><code>session.createSQLQuery("select pkVwPersoneelslid, fkVwFunctie, familienaam, voornaam, code from VW_PERSONEELSLID where code = :code") .setParameter("code", code) .addScalar("pkVwPersoneelslid",DoubleType.INSTANCE) .addScalar("fkVwFunctie",DoubleType.INSTANCE) .addScalar("familienaam",StringType.INSTANCE) .addScalar("voornaam".StringType.INSTANCE) .addScalar("code".StringType.INSTANCE) .setResultTransformer(new AliasToBeanResultTransformer(VwPersoneelslid.class)) .list();</code><br/></p> <p>You need empty constructor and setter/getter; for any issues about check <a href="https://stackoverflow.com/questions/9605821/aliastobeanresulttransformermydto-class-fails-to-instantiate-mydto">this</a> SO answer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload