The SQL statements
Code:
TableDefinition tb3 = (TableDefinition) xxxService.findByCriteria(TableDefinition.class, criteria1).get(0);
yields:
select
this_.technical_id as technical1_67_0_,
this_.technical_version as technical2_67_0_,
this_.valid_from as valid3_67_0_,
this_.valid_until as valid4_67_0_,
this_.definition_version as definition5_67_0_,
this_.display_name as display6_67_0_,
this_.distribution_name as distribu7_67_0_,
this_.description as descript8_67_0_,
this_.has_hierarchy as has9_67_0_,
this_.max_hierarchy_level as max10_67_0_,
this_.is_proposal as is11_67_0_,
this_.is_visible as is12_67_0_,
this_.can_distribute as can13_67_0_,
this_.creation_requester as creation14_67_0_,
this_.creation_approver as creation15_67_0_,
this_.creation_request_date as creation16_67_0_,
this_.creation_approval_date as creation17_67_0_,
this_.last_change_requester as last18_67_0_,
this_.last_change_approver as last19_67_0_,
this_.last_change_request_date as last20_67_0_,
this_.last_change_approval_date as last21_67_0_,
this_.last_distribution_date as last22_67_0_,
this_.attributes_category as attributes23_67_0_,
this_.mappings_category as mappings24_67_0_,
this_.table_authorization_id as table25_67_0_,
this_.status as status67_0_,
this_1_.target_table_definition_id as target2_68_0_,
this_1_.action as action68_0_,
this_1_.proposal_status as proposal4_68_0_,
decode(this_.technical_id,
this_1_.table_definition_id,
1,
0) as clazz_0_
from
TABLE_DEFINITION this_,
STRUCTURE_PROPOSAL this_1_
where
this_.technical_id=this_1_.table_definition_id(+)
and this_.technical_id=?
AND
Code:
TableDefinition tb4 = (TableDefinition) xxxService.getObjectById(TableDefinition.class, refTable.getTechnicalId());
yields
Hibernate:
select
tabledefin0_.technical_id as technical1_67_0_,
tabledefin0_.technical_version as technical2_67_0_,
tabledefin0_.valid_from as valid3_67_0_,
tabledefin0_.valid_until as valid4_67_0_,
tabledefin0_.definition_version as definition5_67_0_,
tabledefin0_.display_name as display6_67_0_,
tabledefin0_.distribution_name as distribu7_67_0_,
tabledefin0_.description as descript8_67_0_,
tabledefin0_.has_hierarchy as has9_67_0_,
tabledefin0_.max_hierarchy_level as max10_67_0_,
tabledefin0_.is_proposal as is11_67_0_,
tabledefin0_.is_visible as is12_67_0_,
tabledefin0_.can_distribute as can13_67_0_,
tabledefin0_.creation_requester as creation14_67_0_,
tabledefin0_.creation_approver as creation15_67_0_,
tabledefin0_.creation_request_date as creation16_67_0_,
tabledefin0_.creation_approval_date as creation17_67_0_,
tabledefin0_.last_change_requester as last18_67_0_,
tabledefin0_.last_change_approver as last19_67_0_,
tabledefin0_.last_change_request_date as last20_67_0_,
tabledefin0_.last_change_approval_date as last21_67_0_,
tabledefin0_.last_distribution_date as last22_67_0_,
tabledefin0_.attributes_category as attributes23_67_0_,
tabledefin0_.mappings_category as mappings24_67_0_,
tabledefin0_.table_authorization_id as table25_67_0_,
tabledefin0_.status as status67_0_,
tabledefin0_1_.target_table_definition_id as target2_68_0_,
tabledefin0_1_.action as action68_0_,
tabledefin0_1_.proposal_status as proposal4_68_0_,
decode(tabledefin0_.technical_id,
tabledefin0_1_.table_definition_id,
1,
0) as clazz_0_
from
TABLE_DEFINITION tabledefin0_,
STRUCTURE_PROPOSAL tabledefin0_1_
where
tabledefin0_.technical_id=tabledefin0_1_.table_definition_id(+)
and tabledefin0_.technical_id=?
technical_id is the identifying column or primairy key of the table