This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate Criteria Ambiguos Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Hibernate Criteria Ambiguos" Watch "Hibernate Criteria Ambiguos" New topic
Author

Hibernate Criteria Ambiguos

Rendi Artha
Greenhorn

Joined: Jan 20, 2010
Posts: 29
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

Joined: Jan 20, 2010
Posts: 29
Still in unsolve matter.. any help would be appreciate.

Rgds,
Rendi (Criterionnewbi)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Hibernate Criteria Ambiguos
 
Similar Threads
Transaction comit problem
ManyToMany inverseJoinColumns side null fields
Associated/ Child Pojo not getting saved with one to many
Need help: Best possible result after comparing objects
Mapping Error Hibernate