Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Amey Dhoke

Greenhorn
+ Follow
since Jan 16, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amey Dhoke

Hello,

This is not causing any problem, just that I am curious to know.

Looks like the way hibernate code works is, it adds columns from the joined table and it adds the same columns again if type join is LEFT_OUTER_JOIN. (The logic is in selectFragment() method of OneToManyPersister class)
Looks like it is a bug but im not sure if there is any other purpose behind this logic.

Any idea ?


Thanks,
Amey
Hi,

I am facing a issue with the query generated by hibernate to load from database.

SELECT this_.id AS id25_1_,
this_.name AS name25_1_,
offices2_.legal_entity_id AS legal3_3_,
offices2_.id AS id3_,
offices2_.id AS id27_0_,

offices2_.name AS name27_0_,
offices2_.legal_entity_id AS legal3_27_0_
FROM cm.legal_entities this_
LEFT OUTER JOIN cm.offices offices2_ ON this_.id = offices2_.legal_entity_id;

Why is hibernate generating query with duplicate reference to offices2_.id ?

My hbm file for legal_entities table is -



And hbm for office is -




Thanks in advance,
Amey