ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Grenier" <Alexandre.Gren...@markettools.com>
Subject RE: Creating a DataTable from an IList returned from the data mapper
Date Tue, 18 Jul 2006 15:08:25 GMT
Although I understand the situation, I wonder if adding support for
datasets would defeat the purpose of ibatis by breaking down the model
it is promoting.

My understanding is that ibatis is a base for building a good
"Persistence Ignorance" domain model. 

In the current case you send in a "query" and retrieve "Plain Old CLR
Objects", so the input is aware of persistence, but the output can be
100% focused on the model.

In the case you propose, the output being a datatable maintains the
concept of persistence after the fact and is not desirable in a model.

Maybe that's not your case, but I feel in most cases it may lead to bad
design and in the long run injecting Non-PI features will blur ibatis'
intention.

 

One way around this would be to enable the user to provide a mechanism
to process the data and build something else than an IList.

 

Alex

 

________________________________

From: Riccardo d'Errico [mailto:riccardo.derrico@gmail.com] 
Sent: Tuesday, July 18, 2006 10:00 AM
To: user-cs@ibatis.apache.org
Subject: Re: Creating a DataTable from an IList returned from the data
mapper

 

I understand this...

Unfortunately not all the components I use accepts a direct binding to
an IList.

As an example some time ago I asked Telerik support if it was possible
to bind directly to their panel bar with an  IList.

The answer was at that time (2 months ago) that  it was not possible but
it could be done iterating the ilist and building the panelbar items
programmatically.

Plus I considered that the datatable was a superset of an IList as it
direcly exposed other features (like sorting and filtering).

It would be possible to add  to the wishlists a QueryForDataSet or
QueryForDataTable methods  for the data mapper?


Mime
View raw message