This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Hibernate Criteria Ambiguos

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all myfrind,
I have some ambiguous using criteria Hibernate.

check my code here.
hibernate.cfg.xml


DeptEmployee.hbm.xml


Test Code :




When i check on DB i found :
3 record on tbl_employee
1 record on tbl_department

Unfortunately when I run those Test Code something happens with message indicate that something throws NullPointerException.
I found that when execute listEmp = criteria.list() it return list employee such this :

1001 | test1 | 1001
1002 | test2 | null
1003 | test3 | null

The question is how can it be since record in tbl_employee indicate no NULL appears on column tbl_employee.departmentId .

Any help would be appreciate a lot.

Thanks in advance,

CriterionNewbie A.K.A. (Rendi Artawijaya)












 
Rendi Artha
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still in unsolve matter.. any help would be appreciate.

Rgds,
Rendi (Criterionnewbi)
 
Grow your own food... or this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic