Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] PROGRESS: Sv: Re: Value of DiscriminatorValue not persisted

Do you have any mappings to EmailPart in your object model? Any cascade settings?

Can you send the call stack up to the persist? And/or turn the logging to finest and send that info as well?

Cheers,
Guy


On 20/08/2013 9:05 AM, Andreas Joseph Krogh wrote:
På tirsdag 20. august 2013 kl. 14:53:38, skrev Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>:
På tirsdag 20. august 2013 kl. 14:46:40, skrev Guy Pelletier <guy.pelletier@xxxxxxxxxx>:
Andreas,

Did you try removing the abstract declaration on EmailPart?
 
No, I will try it.
But this works when persisting objects of type EmailSinglePart in other places of the application so it would be nice to understand what's going on. I really don't want programmers to be able to instantiate EmailPart directly so I'd prefer if it could remain abstract but will test to see if it helps.
 
Do you have any pointers to where ObjectBuilder.descriptor is created so I can see why EmailPart.class is used and not EmailSinglePart.class?
 
Removing "abstract" results in EL inserting "EmailPart" as discriminator-value:
 
LOG:  execute 000000000000004E: INSERT INTO origo_email_part (entity_id, part_index, uid, VERSION, message_id, parent_id, part_type) VALUES ($1, $2, $3, $4, $5, $6, $7)
DETAIL:  parameters: $1 = '286555', $2 = '1', $3 = 'fcaa0282-df46-4eed-8b0b-85ac647954eb', $4 = '1', $5 = '402617', $6 = NULL, $7 = 'EmailPart'
 
This results in other errors as "singletype" is used as value when EL tries to retrieve the entity.
 
It seems I must figure out why EL wants to insert EmailPart.class as value instead of EmailSinglePart.class in ObjectBuilder.descriptor.
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

--

Oracle
Guy Pelletier

ORACLE Canada, 45 O'Connor Street Suite 400 Ottawa, Ontario Canada K1P 1A4

Green
            Oracle Oracle is committed to developing practices and products that help protect the environment


Back to the top