#766 - RawSql should automatically map column alias with underscore to camelCase ... so item_total should automatically map to bean property itemTotal

This commit is contained in:
Robin Bygrave committed 2016-07-08 23:44:11 +12:00
1 parent c7c6410cd9
commit aaf256b9be
6 files changed
+75 -13

No files matched your search

+1 -3
View File
@@ -4,8 +4,6 @@
<entity class="com.avaje.tests.model.basic.OrderAggregate">
<raw-sql name="default">
<column-mapping column="order_id" property="order.id"/>
<column-mapping column="total_items" property="totalItems"/>
<column-mapping column="total_amount" property="totalAmount"/>
<query>
select order_id, count(*) as total_items, sum(order_qty*unit_price) as total_amount
from o_order_detail
@@ -16,7 +14,7 @@
<raw-sql name="withMax">
<column-mapping column="order_id" property="order.id"/>
<query>
select order_id, count(*) as totalItems, sum(order_qty*unit_price) as totalAmount, max(order_qty*unit_price) as maxAmount
select order_id, count(*) as total_items, sum(order_qty*unit_price) as total_amount, max(order_qty*unit_price) as maxAmount
from o_order_detail
group by order_id
</query>