You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Donald Woods <dw...@apache.org> on 2009/05/04 20:13:25 UTC

@ManagedInterface question

Are @ManagedInterface entities allowed to include non-ManagedInterface 
entities?  The docs aren't clear on this -
http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_pc_interfaces.html
http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/persistence/ManagedInterface.html


-Donald

Re: @ManagedInterface question

Posted by Donald Woods <dw...@apache.org>.
It looks like the @Id in the entity is being used in place of the @Id in 
the @ManagedInterface.  For example, if I don't comment out the usage of 
SimpleEntity in the ManagedIface.java test, like the following code 
segment -

     @OneToOne(cascade=CascadeType.PERSIST)
     public SimpleEntity getPC();
     public void setPC(SimpleEntity pc);

I get incorrect meta data as it's looking for the SimpleEntity @Id field 
in the created ManagedInterfaceSup table (where ManagedIface extends 
ManagedInterfaceSup) -

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: 'PC_ID' is 
not a column in table or VTI 'APP.MANAGEDINTERFACESUP'. {INSERT INTO 
ManagedInterfaceSup (id, intFieldSup, intField, embedIntField, PC_ID, 
SELF_ID) VALUES (?, ?, ?, ?, ?, ?)} [code=20000, state=42X14]


But, this all works fine if JDK5 is used for build and runtime, thus the 
OPENJPA-1012 jira....


-Donald


Michael Dick wrote:
> Hi Donald,
> 
> I believe they are allowed to have non-ManagedInterface entities. There have
> been a few examples earlier on the dev / users mailing list that have
> relationships defined with what I assumed were normal entities.
> 
> I've seen your updates to OPENJPA-1012 too though. What's the exact error
> that you see (apologies if I've missed it)?
> 
> -mike
> 
> On Mon, May 4, 2009 at 1:13 PM, Donald Woods <dw...@apache.org> wrote:
> 
>> Are @ManagedInterface entities allowed to include non-ManagedInterface
>> entities?  The docs aren't clear on this -
>>
>> http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_pc_interfaces.html
>>
>> http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/persistence/ManagedInterface.html
>>
>>
>> -Donald
>>
> 

Re: @ManagedInterface question

Posted by Michael Dick <mi...@gmail.com>.
Hi Donald,

I believe they are allowed to have non-ManagedInterface entities. There have
been a few examples earlier on the dev / users mailing list that have
relationships defined with what I assumed were normal entities.

I've seen your updates to OPENJPA-1012 too though. What's the exact error
that you see (apologies if I've missed it)?

-mike

On Mon, May 4, 2009 at 1:13 PM, Donald Woods <dw...@apache.org> wrote:

> Are @ManagedInterface entities allowed to include non-ManagedInterface
> entities?  The docs aren't clear on this -
>
> http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_pc_interfaces.html
>
> http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/persistence/ManagedInterface.html
>
>
> -Donald
>