You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "wilesun (JIRA)" <ji...@apache.org> on 2008/10/22 10:12:44 UTC
[jira] Updated: (OPENJPA-688) support @SecondaryTable in
MappedSuperclass
[ https://issues.apache.org/jira/browse/OPENJPA-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
wilesun updated OPENJPA-688:
----------------------------
Fix Version/s: (was: 1.1.1)
1.3.0
> support @SecondaryTable in MappedSuperclass
> -------------------------------------------
>
> Key: OPENJPA-688
> URL: https://issues.apache.org/jira/browse/OPENJPA-688
> Project: OpenJPA
> Issue Type: Wish
> Components: kernel
> Affects Versions: 1.1.0
> Environment: oracle10g
> Reporter: wilesun
> Fix For: 1.3.0
>
>
> I hope the @SecondaryTable in supperclass,example:
> @MappedSuperclass
> @SecondaryTable(name=".." ..)
> public B extends A {
> }
> @MappedSuperclass
> public C extends B {
> }
> @Entity
> public D extends C {
> }
> @Entity
> public C extends C {
> }
> but query("select o from C where .."), the join is correct.i correct:
> openjpa-jdbc\src\main\java\org\apache\openjpa\jdbc\meta\FieldMappingInfo.java
> /**
> * Return the join from the field table to the owning class table.
> */
> public ForeignKey getJoin(final FieldMapping field, Table table,
> boolean adapt) {
> // if we have no join columns defined, check class-level join
> List cols = getColumns();
> if (cols.isEmpty()) {
> cols = field.getDefiningMapping().getMappingInfo().
> getSecondaryTableJoinColumns(_tableName);
> if (cols.isEmpty()) {
> for (ClassMapping scm = field.getDefiningMapping().getPCSuperclassMapping();
> scm != null;
> scm = scm.getPCSuperclassMapping()) {
>
> cols = scm.getMappingInfo().getSecondaryTableJoinColumns(_tableName);
> if (!cols.isEmpty())
> break;
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.