openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Goodenough <>
Subject Re: Database columns not used by OpenJPA
Date Mon, 31 Mar 2008 12:37:53 GMT
On Monday 31 March 2008, Adam Hardy wrote:
> David Goodenough on 31/03/08 11:06, wrote:
> > I have an application for which I would like to use OpenJPA, and it
> > involves the PostgreSQL tsearch(full text search) facility.
> >
> > Now obviously I would not expect OpenJPA to understand or use (directly)
> > tsearch, so I assume that I can do the actual searches using the facility
> > that OpenJPA has to use real SQL.
> >
> > But in order to use tsearch, I need to set up a column of type tsvector,
> > which is course is not something that OpenJPA can be expected to
> > understand. So the question is how do I tell it to ignore it, i.e. to
> > allow it to exist but not to try to use it.
> Co-incidentally I came across a problem with an unmapped property on an
> entity causing OpenJPA to grind to a halt, until I marked it as transient,
> but I think this is the other side of the coin compared to your situation.
> You don't actually say what you do or do not want to do with the column.
> Presumably you don't have a property on your java entity for the column and
> you are not mapping it?
> AFAIK JPA will ignore columns that are not mapped, so you should be OK, but
> I guess you're asking because it's not OK?

Actually that is exactly what I want, I just could not find the place in the
manual that said it.  

I need to ignore the column because I do not need to try to map a column
of type tsvector into a Java type, as I will only use it in real SQL searches. 
The results of these searches only need the "normal" columns.  

That is fine for normal operations, but is there any way to mark a column as 
to be retained if I use openjpa.jdbc.SynchronizeMappings?  I would not want
to do this normally, just as part of an upgrade process so that the DB is
brought from whatever state it is in to the current schema.


View raw message