• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Eager Fetching not working

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate is not fetching the required field mediaid from joined table ...... with underlined code.





Current Table structure is following:

SELECT DISTINCT brand0_.id AS id1_26_,
   brand0_.CREATED_BY         AS CREATED_BY2_26_,
   brand0_.CREATED_DATE       AS CREATED_DATE3_26_,
   brand0_.IS_DELETED         AS IS_DELETED4_26_,
   brand0_.MODIFIED_BY        AS MODIFIED_BY5_26_,
   brand0_.MODIFIED_DATE      AS MODIFIED_DATE6_26_,
   brand0_.VERSION            AS VERSION7_26_,
   brand0_.OWNER_ID           AS OWNER_ID14_26_,
   brand0_.MEDIAOCEAN_ID      AS MEDIAOCEAN_ID8_26_,
   brand0_.NAME               AS NAME9_26_,
   brand0_.PARENT_ID          AS PARENT_ID15_26_,
   brand0_.SHORT_NAME         AS SHORT_NAME10_26_,
   brand0_.STATUS             AS STATUS11_26_,
   brand0_.THIRD_PARTY_ID     AS THIRD_PARTY_ID12_26_,
   brand0_.TYPE_ID            AS TYPE_ID13_26_,



AND AIM IS TO MAKE FOLLOWING IN JPA....

SELECT DISTINCT brand0_.id,media3_.id AS id1_26_,
   brand0_.CREATED_BY         AS CREATED_BY2_26_,
   brand0_.CREATED_DATE       AS CREATED_DATE3_26_,
   brand0_.IS_DELETED         AS IS_DELETED4_26_,
   brand0_.MODIFIED_BY        AS MODIFIED_BY5_26_,
   brand0_.MODIFIED_DATE      AS MODIFIED_DATE6_26_,
   brand0_.VERSION            AS VERSION7_26_,
   brand0_.OWNER_ID           AS OWNER_ID14_26_,
   brand0_.MEDIAOCEAN_ID      AS MEDIAOCEAN_ID8_26_,
   brand0_.NAME               AS NAME9_26_,
   brand0_.PARENT_ID          AS PARENT_ID15_26_,
   brand0_.SHORT_NAME         AS SHORT_NAME10_26_,
   brand0_.STATUS             AS STATUS11_26_,
   brand0_.THIRD_PARTY_ID     AS THIRD_PARTY_ID12_26_,
   brand0_.TYPE_ID            AS TYPE_ID13_26_,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic