openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-2040) Problems when using "openjpa.MetaDataFactory" Property
Date Tue, 23 Aug 2011 21:15:29 GMT


Michael Dick commented on OPENJPA-2040:

I'm sorry, I didn't explain well enough in the previous update. 

Making the MetaDataFactory user definable is a bigger change - there's a lot of infrastructure
code that needs to change. You should be able to use something like this though : 
    <property name="openjpa.jdbc.MappingFactory" value="mikedd.MyMappingFactory" />

Assuming your MappingFactory extends PersistenceMappingFactory, you should at least get past
the problem with a bad column name. I didn't try to replicate what you need to do with the
MappingFactory though. 

Sorry for not explaining what I meant. 

> Problems when using "openjpa.MetaDataFactory" Property
> ------------------------------------------------------
>                 Key: OPENJPA-2040
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>            Reporter: Marcel Urbanek
>            Assignee: Michael Dick
>              Labels: MetaDataFactory, PersistenceMetaDataFactory, openjpa.MetaDataFactory
> I want to overwrite the MetaDataFactory like described here: 
> But it turned out it doesn't work. I managed to develop a test scenario 
> which easily produces the behaviour I encountered. 
> What _does_ work is the following: 
> Adding 
> <property name="openjpa.MetaDataFactory" value="jpa"/> 
> to persistence.xml. 
> When setting this property my junit test (persisting a simple association, 
> using @Column Annotation to use differing column names) does work. 
> According to the document above, this property Tag should be equivalent to 
> the setting above: 
> <property name="openjpa.MetaDataFactory" 
> value="org.apache.openjpa.persistence.PersistenceMetaDataFactory"/> 
> But when using this configuration my junit test fails. The differing 
> Column Names set by the Attribute are no longer found. 
> Instead the Java Attribute-Names are used in the SQL. 
> My problem is, that I want to implement a custom MetaDataFactory and this 
> doesn't work either (which is expected, because I extend 
> PersistenceMetaDataFactory). 
> Using PersistenceMappingFactory instead doesn't work either.
> For detailed information please see the following discussion:

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message