openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1612) Mapping an unsupported type
Date Tue, 11 May 2010 14:33:40 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12866161#action_12866161
] 

Rick Curtis commented on OPENJPA-1612:
--------------------------------------

Pinaki -

I'll start off by saying that I'm not dead set on this commit by any means. The intent of
this commit was to improve the usability of OpenJPA, but it sounds like I may have sacrificed
some functionality that we used to have.

The problem I was trying to fix is as follows:
* Joe user has two Entities {A,B} and A has a @OneToOne to B.
* Joe messes up when he specifies <class>(s) in his p.xml file and omits B.
* Prior to this commit, OpenJPA took the liberty to serialize B to save it to the DB. Perhaps
there are certain use cases where this would be okay, for the sake of the test it wasn't.

Since javax.persistence.xTox annotations are defined by the spec, I don't think we have the
liberty to define them in any way we like. My understanding is that these annotations are
for Entity to Entity relationships. The code I added checks for this and fails fast.

> Mapping an unsupported type
> ---------------------------
>
>                 Key: OPENJPA-1612
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1612
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> As discussed on the dev mailing list [1]...
> I found that the following mapping: 
> @Entity
> public class AnnoTest1 {
>     @ManyToOne
>     Object o;
> ...
> }
> This results in a warning message [2], but it is allowed. This JIRA will be used to detect
this condition and fail fast. 
> [1] http://openjpa.markmail.org/thread/6yphicehgclyobag
> [2] 297  TestConv  WARN   [main] openjpa.MetaData - OpenJPA cannot map field "test.AnnoTest1.o"
efficiently.  It is of an unsupported type. The field value will be serialized to a BLOB by
default.

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


Mime
View raw message