Luciano,
EclipseLink will currently only
write to a single discrinator column. That
being said, you may be able
to do a couple things to make this work, you'll have to play with
it a bit but try:
1 - adding a mapping to TP_HARM in
HarmNotification.
2 - HarmNotification instances will set that mappings value to I
3 - DengueNotification instances
will set that mappings
value to DG
4
- add an @AdditionalCriteria to HarmNotification
make the additional AND check to
TP_HARM IN
Cheers,
Guy
On 11/06/2013 10:40 AM, Luciano Santos
wrote:
No, it can't handle this way
Here's a SQL statement from what has been generated
for a HarmNotification query:
SELECT CO_SEQ_NOTIFICATION, ... FROM TB_NOTIFICATION
WHERE ((CO_SEQ_NOTIFICATION = ?) AND (TP_NOTIFICATION
IN (?, ?, ?, ?, ?, ?, ?)))
bind => [4, I, DG, CQ, PA, DE, VL, ME]
It should have been
WHERE ((CO_SEQ_NOTIFICATION = ?) AND TP_NOTIFICATION =
'?' AND (TP_HARM IN (?, ?, ?, ?, ?, ?)))
bind => [4, I, DG, CQ, PA, DE, VL, ME]
So i tried to use JOINED on Notification class as you
suggested, but then it fails looking for an unknown
HarmNotification table.
Not sure if it can just be done using Tenant, but if so it's
gonna be a problem to update all the repositories to set
this on EntityManager.
Any other thoughts?
Thanks
--

Guy Pelletier
ORACLE Canada,
45 O'Connor Street
Suite 400
Ottawa, Ontario
Canada K1P 1A4
Oracle is committed to developing practices
and products that help protect the environment
|