openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: How to query on interface in OpenJPA
Date Sun, 24 Jun 2007 09:44:18 GMT
OpenJPA certainly should be able to handle interfaces -- see
OpenJPAEntityManager.createInstance(). I don't see any tests of this
method in the OpenJPA test suite, though.

-Patrick

On 6/23/07, Marc Prud'hommeaux <mprudhom@apache.org> wrote:
> David-
>
> According to the spec, "interfaces should not be designated as
> entities", and if you can't declare it as an entity, then you don't
> have anywhere to specify its interface name.
>
> The Kodo JDO layer on top of OpenJPA does support querying on
> interfaces, though. I wonder if it would work if you did "select i
> from com.somepackage.IData i". If that raises an error, can you post
> the stack trace?
>
>
> On Jun 22, 2007, at 7:08 PM, David Ezzio wrote:
>
> > Hi everyone,
> >
> > I've recently run into a bug in Kodo JDO that appears to be
> > occurring in
> > OpenJPA. I have a test case that fails in Kodo JDO, but I'm stumped
> > how
> > to port the test case to OpenJPA.
> >
> > My test case has two data classes and one interface that each class
> > implements. SensorData and PublicData are the data classes and
> > IData is
> > the interface. The interface and classes are very simple.
> >
> > What I need to do is query on the interface, and I don't know how
> > to do
> > it.  I don't know how to annotate the interface or whether I
> > should.  I
> > don't know how to write the query.  A simple, "select i from IData i"
> > would be just fine if it worked.
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > David Ezzio
> >
> >
> > Notice:  This email message, together with any attachments, may
> > contain information  of  BEA Systems,  Inc.,  its subsidiaries
> > and  affiliated entities,  that may be confidential,  proprietary,
> > copyrighted  and/or legally privileged, and is intended solely for
> > the use of the individual or entity named in this message. If you
> > are not the intended recipient, and have received this message in
> > error, please immediately return this by email and then delete it.
>
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message