Try to study a similar solution using DateAdd for each dialect.A simple math operation is not viable in this case (as not was viable even for Microsoft MsSQL).
2009/6/3 Dmitiry Nagirnyak <[email protected]> > Hi Fabio, > > 2009/6/4 Fabio Maulo <[email protected]> > >> Ah.. there is another option. 1) study what is needed for each RDBMS >> 2) create a JIRA to add a new HQL function >> > I'm not too sure exactly, so wouldn't bother guys with unrealistic stuff > from top of my head. > But for this particular example it seems following functions (operations) > would be useful: > - DateTime + TimeSpan => DateTime > - DateTime - DateTime => TimeSpan > > > >> Perhaps, for this specific case, you can use standard value comparison >>> for ranges (as '>=', '<=', '>', between ...) >>> >> Ideally yes, but only if one of the operations above would be supported: > - "from Meeting m where (m.StartDate + m.Duration) >= :timeToCompare". > - "from Meeting m where (:timeToCompare - m.StartDate) >= m.Duration". > Otherwise, we cannot do it. > > > Cheers, > Dmitriy. > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
