[ 
https://issues.apache.org/jira/browse/OPENJPA-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Markus Herzog updated OPENJPA-106:
----------------------------------

    Attachment: tracelog2.zip
                tracelog1.zip

Hi,

here are two log files with trace output. The first one has no errors, because 
the databases (PLAYGROUND and PLAYGROUND2) do not have any tables yet. The 
tables (PLAYGROUND.FOO and PLAYGROUND2.BAR) are created properly.
When i run the mapping and schema tool again things start do get strange (see 
second log file).

this is a piece of my ant script:
<mappingtool action="refresh" 
schemaFile="${project.etcoutput.dir}/jdo/schema.xml">
        <classpath refid="project.classpath"/>
        <fileset dir="${project.output.dir}">
                <include name="**/package.jdo" />
        </fileset>
</mappingtool>

<schematool action="refresh">
        <fileset dir="${project.etcoutput.dir}/jdo">
                <include name="schema.xml" />
        </fileset>
</schematool>

Thank you very much,
Markus

> MappingTool does not function properly when using database-prefix in 
> table-names on mysql
> -----------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-106
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-106
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>         Environment: OS: Windows and Unix, openjpa-0.9.6-incubating, 
> mysql-5.x, mysql-jdbc-connector 3.?? and 5.0.4
>            Reporter: Markus Herzog
>            Priority: Minor
>         Attachments: tracelog1.zip, tracelog2.zip
>
>
> Hi,
> the problem i'm going to describe here probably only exists when using 
> openjpa together with mysql. Maybe this is even a bug in the 
> mysql-jdbc-connector.
> The MappingTool (and MappingToolTask) does not notice that a table exists 
> when the name of the table also contains the name of the database (for 
> example <class name="my.company.MyClass" table="my_database.MYCLASS" />)
> Everything else is working satisfyingly with this prefix-thingy. As a work 
> around i'm removing the prefixes from my metadata before using mappingtool 
> and put it back in afterwards. (I need this prefix after all because i'm 
> using multiple databases at once).
> Maybe when the mappingtool asks the database for the table 
> "my_database.MYCLASS", the jdbc-connector tells openjpa that no such table 
> exists. If so, can't mappingtool ask the database differently?
> Thank you for listening and keep up the good work,
> Markus

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

Reply via email to