You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Patrick Linskey <pl...@gmail.com> on 2007/08/20 21:18:09 UTC

configuration of non-standard field types

Hi,

OpenJPA supports a number of field types beyond what is listed in the
JPA spec. How should people designate that such fields are to be
persisted?

Currently, I believe that people must annotate such fields with
@Persistent. (We may have an exception for the new XML stuff in this
case.) I think that it'd be useful for us to have a consistent story
for these situations.

We should come up with a consistent rule of thumb that will work for
both the new XML code and the code that Ignacio has been working on
for OPENJPA-130.

I think that at the least, we should automatically install
FieldStrategies for all the fields that we can handle.

Should we require @Persistent for non-JPA field types, or
automatically persist them if we know how to?

-Patrick

-- 
Patrick Linskey
202 669 5907

Re: configuration of non-standard field types

Posted by Marc Prud'hommeaux <mp...@apache.org>.
I would go with making any fields that we know how to persist be  
automatically persistent. Since @Transient is a standard annotation  
but @Persistent is not, it makes more sense to me that people should  
have to opt-out of persisting fields than opt-in.



On Aug 20, 2007, at 3:18 PM, Patrick Linskey wrote:

> Hi,
>
> OpenJPA supports a number of field types beyond what is listed in the
> JPA spec. How should people designate that such fields are to be
> persisted?
>
> Currently, I believe that people must annotate such fields with
> @Persistent. (We may have an exception for the new XML stuff in this
> case.) I think that it'd be useful for us to have a consistent story
> for these situations.
>
> We should come up with a consistent rule of thumb that will work for
> both the new XML code and the code that Ignacio has been working on
> for OPENJPA-130.
>
> I think that at the least, we should automatically install
> FieldStrategies for all the fields that we can handle.
>
> Should we require @Persistent for non-JPA field types, or
> automatically persist them if we know how to?
>
> -Patrick
>
> -- 
> Patrick Linskey
> 202 669 5907