Forums Register Login

problematic ejb ql query

+Pie Number of slices to send: Send
I got an alerts table that contains alerts recived by servers the columns are: serverip, time stamp,alert type.
I would like to get a list of all alerts but if two alerts have the same ip and type - i want to check thier time stamp and only if alert a.timestame >alertb.timestamp + 60 sec - i want to see both of them
otherwise only one of then should be returned from the query(the newer one).
will be happy to see some complex examples of ejb ql.
thanks
liat
+Pie Number of slices to send: Send
Liat,
That seems to complex to do in EJB-QL. You can write a simpler finder and put the logic in a session bean. In other words, call the session bean and filter the results there.
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 508 times.
Similar Threads
Doubts on EJB-QL
Problem in EJB QL Finder Method.....
Alert timeout
Discussion of Naming Policy
Hibernate mapping types
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:17:24.