| Hi there,I've a little problem I cannot solve properly.
 
 I've in a table, two date fields. The first one is called Valid_From and cannot be null. The second one is Valid_to and can be null.
 The idea is that if valid_to is null, there is no expiration date.
 
 I wish to only retreive valid rows from the database.
 
 The way I work now is to retreive every row that is after Valid_From and then, manually check if Valid_to is not null and before now, remove it from the results, wich can become very heavy.
 
 My question: is there any nicer way to do that in HQL directly ?
 
 Thanks in advance,
 
 Romain.
 
 
 |