Skip to content

Instantly share code, notes, and snippets.

@stliu
Created August 14, 2013 08:16
Show Gist options
  • Save stliu/6228958 to your computer and use it in GitHub Desktop.
Save stliu/6228958 to your computer and use it in GitHub Desktop.
select
customer0_.id as id1_1_3_,
customer0_.customerNumber as customer2_1_3_,
customer0_.lastOrder_id as lastOrde4_1_3_,
customer0_.name as name3_1_3_,
order1_.id as id1_0_0_,
order1_.country_id as country_4_0_0_,
order1_.deliveryDate as delivery2_0_0_,
order1_.orderNumber as orderNum3_0_0_,
country2_.id as id1_4_1_,
country2_.name as name2_4_1_,
orders3_.Customer_id as Customer1_1_5_,
order4_.id as orders_i2_2_5_,
order4_.id as id1_0_2_,
order4_.country_id as country_4_0_2_,
order4_.deliveryDate as delivery2_0_2_,
order4_.orderNumber as orderNum3_0_2_
from
Customer customer0_
left outer join
C_ORDER order1_
on customer0_.lastOrder_id=order1_.id
left outer join
Order_Country country2_
on order1_.country_id=country2_.id
left outer join
Customer_C_ORDER orders3_
on customer0_.id=orders3_.Customer_id
left outer join
C_ORDER order4_
on orders3_.orders_id=order4_.id
where
customer0_.id=?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment