Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@inheritance, erro when get id #2

Open
restarac opened this issue May 24, 2013 · 0 comments
Open

@inheritance, erro when get id #2

restarac opened this issue May 24, 2013 · 0 comments
Labels

Comments

@restarac
Copy link
Owner

Quando utilizado o metoda para ReflectionEntity.entityIdValue(entity), ele nao rastreia o se a classe em questão possui uma superclasse com o ID.

Nesse caso, caso a classe exista uma superclasse deve ser procurado o id nessa super classe também. No caso do @Inheritance, nao há id na classe filha, somente na superclasse que é compartilhado como se fosse o mesmo dado.

@entity
@table(name="SUB", schema="CNTRCT")
@Inheritance(strategy=InheritanceType.JOINED)
public class Subscription {
...
}

@entity(name="Lifetime")
public class LifetimeSubscription
extends Subscription {
...//without id...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant