it is the same for SP:
<sql-query....
<return class="namespace.MyProjectionResult, assemblyFile"/>
exec my_sp....
2008/12/4 Ricardo Borges <[EMAIL PROTECTED]>:
> All you need is a simple POCO to map your sql-query projection
> return.... you doesn't need an entity mapped in your domain....
>
> it is like:
>
> <sql-query....
> <return class="namespace.MyProjectionResult, assemblyFile"/>
>
> select a.flag, b.prop1, c.prop2.....
>
> </>
>
> public class MyProjectionResult
> {
> - flag
> - prop1
> - prop2
> }
>
>
> http://www.hibernate.org/hib_docs/nhibernate/html/querysql.html
>
>
>
>
>
> 2008/12/4 Martin Palatnik <[EMAIL PROTECTED]>:
>>
>> I'm having some troubles with stored procedures (sp) and nhibernate. I
>> want to map from the returned values of a sp a part to a domain object
>> (already mapped through hbm.xml) and another part to a flag variable.
>> Which is the best way of doing this? without casting objects? As a
>> solution i was trying adding a property value in the domain object
>> named "status" and trying to map that property in the return-property…
>> of sql-query that has the sp.
>>
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---