You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Ron Grabowski <ro...@yahoo.com> on 2005/05/09 20:26:08 UTC
IBatisNet's new listClass attribute for
Gilles, does the new listClass attribute on <select> statements allow
properties that previously had to be IList to become strongly typed
collections instead? For example:
// without listClass
public class Order
{
private int _id;
private Account _account;
private string _postalCode;
private IList _lineItems;
}
// with listClass
public class Order
{
private int _id;
private Account _account;
private string _postalCode;
private LineItemCollection _lineItems;
}
Re: IBatisNet's new listClass attribute for
Posted by Gilles Bayon <ib...@gmail.com>.
Yes but it's old :-)
Nunit test TestQueryForListWithListClass
LineItemCollection linesItem =
sqlMap.QueryForList("GetLineItemsForOrderWithListClass", 10) as
LineItemCollection;
<statement id="GetLineItemsForOrderWithListClass"
parameterClass="int"
listClass="LineItemCollection"
resultClass="LineItem">
select
LineItem_ID as Id,
LineItem_Code as Code,
LineItem_Quantity as Quantity,
LineItem_Price as Price
from LineItems where Order_ID = #value#
order by LineItem_Code
</statement>
On 5/9/05, Ron Grabowski <ro...@yahoo.com> wrote:
> Gilles, does the new listClass attribute on <select> statements allow
> properties that previously had to be IList to become strongly typed
> collections instead? For example:
>
> // without listClass
> public class Order
> {
> private int _id;
> private Account _account;
> private string _postalCode;
> private IList _lineItems;
> }
>
> // with listClass
> public class Order
> {
> private int _id;
> private Account _account;
> private string _postalCode;
> private LineItemCollection _lineItems;
> }
>