Hello,

Does the new mapping by code work with the also new <subselect/>
feature?
I'm asking this because I can't get it to work, although it doesn't
throw any exception. Also, I can't find a way to specify the
<synchronize/> element. It does work well with XML configuration,
though.
Here's my code:

mapper.Class<OrderCustomer>(ca =>
{
        ca.Mutable(false);
        ca.Subselect("SELECT [order].id AS orderid, [order].date AS
orderdate, customer.name AS customername FROM [order] INNER JOIN
customer ON customer.id = [order].customerid");
        ca.Id(x => x.OrderId, map =>
        {
                map.Column("`ORDERID`");
                map.Generator(Generators.Assigned);
        });
        ca.Property(x => x.CustomerName, x =>
        {
                x.Column("`CUSTOMERNAME`");
                x.Update(false);
        });
        ca.Property(x => x.OrderDate, x =>
        {
                x.Column("`ORDERDATE`");
                x.Update(false);
        });
});

Fabio, any ideas? Perhaps I should wait some more days...?

Thanks, once again!

RP

-- 
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