You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Adam Furmanczuk <af...@knowtrek.com> on 2013/02/22 12:39:04 UTC

Cannot join on constant field

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I wanted to know if constant join is possible in OpenJPA 2.2.x.

As far as [1] is concerned, affected version is 2.1


I feel, join on constant is an essential feature. I followed guide [2]
and applied constant joins in my project using openjpa 2.2.x , but I
get same error as in [1].

I would welcome, if someone tells me that it is currently not
possible, or provide some working snippet to show it works.

Your help is much appreciated.

Greetings,

Adam

[1] https://issues.apache.org/jira/browse/OPENJPA-2054
[2]
http://people.apache.org/~mikedd/nightly.builds/apache-openjpa-2.3.0-SNAPSHOT/docs/docbook/manual/ref_guide_mapping_notes_nonstdjoins.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlEnWNgACgkQefEEI87R1Dfu/wCghGQDh3Au5w80evdU7FQqjZsX
bAoAoJ7tAz39BRik26nvt4SK8jmqFGz8
=kx2R
-----END PGP SIGNATURE-----

Re: Cannot join on constant field

Posted by Pinaki Poddar <pp...@apache.org>.
There is a recent commit on OPENJPA-1979



-----
Pinaki Poddar
Chair, Apache OpenJPA Project
--
View this message in context: http://openjpa.208410.n2.nabble.com/Cannot-join-on-constant-field-tp7582928p7583259.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Cannot join on constant field

Posted by Adam Furmanczuk <af...@knowtrek.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Rick,

thank you much for your help. I have followed the Instruction in 1979
[1]. As I understand new quoting rule this looks exactly like the
manual [2] suggests for nonstandard-joins:

@JoinColumn(name="T2.PK2" referencedColumnName="'a'")

No error is thrown, but that particular join has no effect at all. As
if the line was totally missing. In the above join example [2] I get
not only values 'a' from T2.Pk2, but also 'b', 'c', etc.

As comments suggest, people still have issue with that. There is even
a patch submitted at issue 1979. I will try to comprehend the patch
and compare with the current AnnotationPersistenceMappingParser.

Greetings,

Adam


[1] https://issues.apache.org/jira/browse/OPENJPA-1979
[2]
http://people.apache.org/~mikedd/nightly.builds/apache-openjpa-2.3.0-SNAPSHOT/docs/docbook/manual/ref_guide_mapping_notes_nonstdjoins.html


> Take a at OPENJPA-1979 and see if that helps shed some light on
> what is going on?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlEng/MACgkQefEEI87R1DdnqwCdHYzHVaJJ4nGHODQi7+TXgjBW
FTQAn11TzQIjmz3BDyR2uqY7iy8SRg5a
=Bg3J
-----END PGP SIGNATURE-----

Re: Cannot join on constant field

Posted by Rick Curtis <cu...@gmail.com>.
Take a at OPENJPA-1979 and see if that helps shed some light on what is
going on?

Thanks,
Rick


On Fri, Feb 22, 2013 at 5:39 AM, Adam Furmanczuk
<af...@knowtrek.com>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I wanted to know if constant join is possible in OpenJPA 2.2.x.
>
> As far as [1] is concerned, affected version is 2.1
>
>
> I feel, join on constant is an essential feature. I followed guide [2]
> and applied constant joins in my project using openjpa 2.2.x , but I
> get same error as in [1].
>
> I would welcome, if someone tells me that it is currently not
> possible, or provide some working snippet to show it works.
>
> Your help is much appreciated.
>
> Greetings,
>
> Adam
>
> [1] https://issues.apache.org/jira/browse/OPENJPA-2054
> [2]
>
> http://people.apache.org/~mikedd/nightly.builds/apache-openjpa-2.3.0-SNAPSHOT/docs/docbook/manual/ref_guide_mapping_notes_nonstdjoins.html
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlEnWNgACgkQefEEI87R1Dfu/wCghGQDh3Au5w80evdU7FQqjZsX
> bAoAoJ7tAz39BRik26nvt4SK8jmqFGz8
> =kx2R
> -----END PGP SIGNATURE-----
>



-- 
*Rick Curtis*