http://msdn.microsoft.com/en-us/library/ms187928.aspx
On Tue, Oct 28, 2008 at 6:23 PM, mauro papagno <[EMAIL PROTECTED]>wrote:
> ok I found
>
> the mapping shoul be something like this:
>
> <
> property name="OrderDay" formula="DATEADD(day, DATEDIFF(day, 0,
> orderedDate), 0)" type="Int32" />
> just another question how can I set read only in the mapping property ?
> cheers
>
>
>
> 2008/10/28 Will Shaver <[EMAIL PROTECTED]>
>
>>
>> The easiest way that comes to mind would be to map a read-only
>> property to a sql conversion Convert('dd', OrderDate)
>>
>> <property name="OrderDay" formula="Convert('dd', OrderDate)" type="Int"/>
>>
>> The Convert('dd' OrderDate) might vary depending on your backing db.
>>
>> You could then reference OrderDay in your criteria queries.
>>
>> On Tue, Oct 28, 2008 at 3:40 PM, Mauro <[EMAIL PROTECTED]> wrote:
>> >
>> > HI
>> > I have a question for you monster of nhibernate ;-)
>> >
>> > I try to make a quey with HQL dialects where I have group by date.
>> > I try to explain better:
>> > I have a field.. let call it: OrderDate in Order class in this field
>> > is stored the date in format like "28/10/2008 15:51:15"
>> > How can retrive and group only by DAYS ?
>> > as result's example will be like this :
>> > (sum) (day)
>> > 5 27
>> > 13 28
>> > 10 29
>> > 11 30
>> > 9 31
>> > 10 1
>> > etc..
>> >
>> > Is it possible ?
>> >
>> > thanks
>> >
>> > >
>>
>>
>
>
> --
> Warning Notice
> The information contained in this communication and any documents
> transmitted with it are confidential, may be privileged and are intended
> solely for the use of the intended recipient. If you are not the addressee
> any copying, retransmission, distribution, action taken, or omitted to be
> taken in reliance upon it is strictly prohibited and may be unlawful. If you
> have received this communication in error please notify us immediately by
> e-mail and delete it from your system and destroy any copies of it.
>
> Avviso
> Le informazioni contenute in questo messaggio di posta elettronica sono
> riservate e confidenziali e ne e' vietata la diffusione in qualunque modo
> eseguita.
> Qualora Lei non fosse la persona cui il presente messaggio e' destinato, e'
> invitata a non diffonderlo, e ad eliminarlo, dandone gentilmente
> comunicazione al mittente.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---