I have to ask "why?"
any way if you explictly want the dto as a separet object with an id
the why not have a seperate type that has an id an component
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="xxx"
assembly="xxx" >
<class name="OrderThing" table="OrderThing">
<id name="Id" column="Id" >
<generator class="assigned" /><!-- ??? -->
</id>
<component class="OrderDTO" name="OrderDTO">
<property ..... />
</component>
</class>
</hibernate-mapping>
is that going to help? it doe mean there is an object that is in
effect acting like a dictionary (orderThing) but you get access to
your dto with out an ID
is this even close to what you are after?
RhysC
On Aug 11, 5:07 pm, Krzysztof Koźmic (2) <[email protected]> wrote:
> I have two types in my domain, say ClientData and Order
> Client can have multiple orders so its 1-n relation.
>
> However, I want ClientData class, to not have Orders collection
> ICollection<Order> but instead to have IDictionary<Guid,OrderDTO> that
> is dictionary of DTOs for Order, keyed by order Id.
>
> How do I construct my mapping for that, so that I'll be able to do
> simply session.CreateCriteria<ClientData>().List<ClientData>(); and
> get all I need?
>
> thanks in advance.
>
> Krzysztof
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---