Skip to content

Loading…

DDC-1281: ORM uses BasicEntityPersister instead of JoinedSubclassPersister on a JOINED inheritance #1894

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user yourwebmaker:

Hi,
I have these classes: https://gist.github.com/1085518/58b5424bc0ab5af1ae65421fe832e7a1b45533cf (read the comments to see the stracktrace)

If I try:
$entity = $em->find('Usuario', $id);
$entity->getPessoaFisica()->getId();
I got this error: Class does not exist.

This is looking weird because, analyzing the stacktrace, the ORM loads the proxy through the BasicEntityPersister instead of JoinedSubclassPersister.

I've been discussed about this on: http://groups.google.com/group/doctrine-user/browse_thread/thread/190dc2c4b768ae13#

Regards,
Daniel Lima

@doctrinebot

Comment created by @beberlei:

It seems your mappings are wrong, the @JoinColumn maps to a column named CODPERFILUSUARIO, but that is not the ID of the Joined Entity base class.

@doctrinebot

Comment created by yourwebmaker:

There was a wrong column definition on discriminator column:

On the DATABASE was: CHAR(30).

The hydrator filled discriminator column with "F " or "J " (with blank spaces), making it impossible to Discriminator map to locate the related classes.

I think it´s a bug with OCI driver or Doctrine´s Hydrator.

@doctrinebot

Issue was closed with resolution "Invalid"

@doctrinebot

Comment created by @beberlei:

That is how oracle works. It right pads chars.

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.