We have a rich domain model that is used across the application
(ASP.NETMVC2).  Some of our views are Master Detail Views , basically
paginated
summary reports. We  navigate to the the Detail View from these summary
views.

The summary views is currently using a list of full-blown domain entities ,
and is therefore not very performant.  We want to re-write the query in the
summary report to use report queries / projection queries to retrieve only
the data that is needed - now we would like to be able to re-use the domain
model rather than introduce a new DTO. As this will save us the trouble of
refactoring the summary views to use the new DTO.  The partial objects are
read-only and will not be persisted.

Thanks,
Vikram


On Sun, Mar 13, 2011 at 3:06 PM, José F. Romaniello
<[email protected]>wrote:

> ditto.
> Who wants half object?
>
>
> 2011/3/13 John Davidson <[email protected]>
>
>> And what happens when a flush occurs? How does NHibernate know to ignore
>> these partial objects, or how does it handle them if what was partial now
>> became a full object that you do want to save.
>>
>> As mentioned above, seems to be _very_ dangerous.
>>
>> John Davidson
>>
>>
>> On Sun, Mar 13, 2011 at 4:32 PM, Vikram Nayak <[email protected]>wrote:
>>
>>> This query will return a list of Business objects, but with only the
>>>
>>> specified fields instantiated. Note that this is a powerful
>>> technique, as the presentation layer may use ordinary business classes
>>> instead of data transfer objects, without having to know the details
>>> of the querying techniques being used
>>> Vikram
>>> Make a loan, Make a difference - Kiva.org
>>>
>>>
>>>
>>> On Sun, Mar 13, 2011 at 12:28 PM, Fabio Maulo <[email protected]>wrote:
>>>
>>>> On Sun, Mar 13, 2011 at 4:08 PM, Vikram Nayak 
>>>> <[email protected]>wrote:
>>>>
>>>>> Yes, but instead of returning a object[] or a CustomDTO it would be
>>>>> nice to be able to return the root entity initialized with only the
>>>>> fields specified in the query.
>>>>>
>>>>
>>>> eh?
>>>>
>>>> --
>>>> Fabio Maulo
>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhusers" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "nhusers" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to