You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Geraldo Xexéo (JIRA)" <ji...@apache.org> on 2008/08/15 20:17:44 UTC

[jira] Created: (OPENJPA-694) @SecondaryTable expected behavior is INNER JOIN?

@SecondaryTable expected behavior is INNER JOIN?
------------------------------------------------

                 Key: OPENJPA-694
                 URL: https://issues.apache.org/jira/browse/OPENJPA-694
             Project: OpenJPA
          Issue Type: Question
          Components: docs, jpa
         Environment: Any
            Reporter: Geraldo Xexéo


I have some code running that makes me believe that the @Secondarytable annotation has the INNER JOIN behavior. 

I checked both the original JPA specification and many implementations and none of them talks about the subject. Hibernate, however, has this in the documentation.

Can you confirm it? It has a lot of side effects, for example:

1) Some implementations will not create a row in the secondary table if all the fields are NULL, this will make an object impossible to retrieve or edit. (since the inner join will return null, but it will exist on the primary table).

2) Rows from legacy tables that can´t be extended, a good reason to use secondarytable, will not be retrieved if we do not create, probably "out of the box", rows in the secondary table, even if we don´t have any information to fill there.

Can you answer on the implemented behavior and comment on my two examples?

Should this be pointed to JPA specification responsibles?

Thanks,
xexeo


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-694) @SecondaryTable expected behavior is INNER JOIN?

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628060#action_12628060 ] 

Craig Russell commented on OPENJPA-694:
---------------------------------------

I think that the JPA specification, currently under review for a new release, should address this issue. Without an explicit standard way to specify inner or outer join behavior, applications cannot be portable.

That said, the OpenJPA documentation should be updated so folks know what to expect. Can you provide a patch?

> @SecondaryTable expected behavior is INNER JOIN?
> ------------------------------------------------
>
>                 Key: OPENJPA-694
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-694
>             Project: OpenJPA
>          Issue Type: Question
>          Components: docs, jpa
>         Environment: Any
>            Reporter: Geraldo Xexéo
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Hibernate explicitly defines the behavior of secondary tables. (such as in http://www.hibernate.org/hib_docs/annotations/api/org/hibernate/annotations/Table.html#fetch())
> I checked both the original JPA specification and many implementations and none of them talks about the subject. Hibernate, however, has this in the documentation.
> Can you confirm it? It has a lot of side effects, for example:
> Can you answer on the implemented behavior and comment on my two examples?
> Should this be pointed to JPA specification responsibles?
> Thanks,
> xexeo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-694) @SecondaryTable expected behavior is INNER JOIN?

Posted by "Geraldo Xexéo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geraldo Xexéo updated OPENJPA-694:
----------------------------------

    Description: 
Hibernate explicitly defines the behavior of secondary tables. (such as in http://www.hibernate.org/hib_docs/annotations/api/org/hibernate/annotations/Table.html#fetch())

I checked both the original JPA specification and many implementations and none of them talks about the subject. Hibernate, however, has this in the documentation.

Can you confirm it? It has a lot of side effects, for example:

Can you answer on the implemented behavior and comment on my two examples?

Should this be pointed to JPA specification responsibles?

Thanks,
xexeo


  was:
I have some code running that makes me believe that the @Secondarytable annotation has the INNER JOIN behavior. 

I checked both the original JPA specification and many implementations and none of them talks about the subject. Hibernate, however, has this in the documentation.

Can you confirm it? It has a lot of side effects, for example:

1) Some implementations will not create a row in the secondary table if all the fields are NULL, this will make an object impossible to retrieve or edit. (since the inner join will return null, but it will exist on the primary table).

2) Rows from legacy tables that can´t be extended, a good reason to use secondarytable, will not be retrieved if we do not create, probably "out of the box", rows in the secondary table, even if we don´t have any information to fill there.

Can you answer on the implemented behavior and comment on my two examples?

Should this be pointed to JPA specification responsibles?

Thanks,
xexeo



> @SecondaryTable expected behavior is INNER JOIN?
> ------------------------------------------------
>
>                 Key: OPENJPA-694
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-694
>             Project: OpenJPA
>          Issue Type: Question
>          Components: docs, jpa
>         Environment: Any
>            Reporter: Geraldo Xexéo
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Hibernate explicitly defines the behavior of secondary tables. (such as in http://www.hibernate.org/hib_docs/annotations/api/org/hibernate/annotations/Table.html#fetch())
> I checked both the original JPA specification and many implementations and none of them talks about the subject. Hibernate, however, has this in the documentation.
> Can you confirm it? It has a lot of side effects, for example:
> Can you answer on the implemented behavior and comment on my two examples?
> Should this be pointed to JPA specification responsibles?
> Thanks,
> xexeo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.