You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Lechner Andreas <al...@at.focusmr.com> on 2014/11/04 09:23:21 UTC
jdo find object for refernced object strategy
Hi,
maybe it is a stupid question, but was is the best strategie for the following
sceanrio?
I have a class A, that contains a reference to class B.
How do i find all classes A wich have the special class B?
I use following annotations for my classes:
@PersistenceCapable(identityType=IdentityType.DATASTORE)
@DatastoreIdentity(strategy=IdGeneratorStrategy.INCREMENT, column="id")
@Version(strategy=VersionStrategy.VERSION_NUMBER, column="version")
I was looking in the JDO help, but I am blind maybe.
best regards
Andreas
Re: jdo find object for refernced object strategy
Posted by Lechner Andreas <al...@at.focusmr.com>.
Hi Dan,
thank you, that helped.
I was blind.
best regards
Andreas
----- Ursprüngliche Mail -----
Von: "Dan Haywood" <da...@haywood-associates.co.uk>
An: "users" <us...@isis.apache.org>
Gesendet: Dienstag, 4. November 2014 09:30:15
Betreff: Re: jdo find object for refernced object strategy
Hi,
If I understand you correctly, you want to write a query "select from A
where b = :someB" ?
If so, take a look at these examples from Estatio [1], [2]
HTH
Dan
[1]
https://github.com/estatio/estatio/blob/ISIS-537-use-bootstrap/dom/src/main/java/org/estatio/dom/agreement/AgreementRole.java#L74
[2]
https://github.com/estatio/estatio/blob/ISIS-537-use-bootstrap/dom/src/main/java/org/estatio/dom/agreement/AgreementRoles.java#L67
On 4 November 2014 08:23, Lechner Andreas <al...@at.focusmr.com> wrote:
> Hi,
>
> maybe it is a stupid question, but was is the best strategie for the
> following
> sceanrio?
>
> I have a class A, that contains a reference to class B.
> How do i find all classes A wich have the special class B?
>
> I use following annotations for my classes:
> @PersistenceCapable(identityType=IdentityType.DATASTORE)
> @DatastoreIdentity(strategy=IdGeneratorStrategy.INCREMENT, column="id")
> @Version(strategy=VersionStrategy.VERSION_NUMBER, column="version")
>
> I was looking in the JDO help, but I am blind maybe.
>
> best regards
> Andreas
>
Re: jdo find object for refernced object strategy
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi,
If I understand you correctly, you want to write a query "select from A
where b = :someB" ?
If so, take a look at these examples from Estatio [1], [2]
HTH
Dan
[1]
https://github.com/estatio/estatio/blob/ISIS-537-use-bootstrap/dom/src/main/java/org/estatio/dom/agreement/AgreementRole.java#L74
[2]
https://github.com/estatio/estatio/blob/ISIS-537-use-bootstrap/dom/src/main/java/org/estatio/dom/agreement/AgreementRoles.java#L67
On 4 November 2014 08:23, Lechner Andreas <al...@at.focusmr.com> wrote:
> Hi,
>
> maybe it is a stupid question, but was is the best strategie for the
> following
> sceanrio?
>
> I have a class A, that contains a reference to class B.
> How do i find all classes A wich have the special class B?
>
> I use following annotations for my classes:
> @PersistenceCapable(identityType=IdentityType.DATASTORE)
> @DatastoreIdentity(strategy=IdGeneratorStrategy.INCREMENT, column="id")
> @Version(strategy=VersionStrategy.VERSION_NUMBER, column="version")
>
> I was looking in the JDO help, but I am blind maybe.
>
> best regards
> Andreas
>