Schema name is ignored by MappingTool when the @Table() annotation contains only a schema parameter, but no name ---------------------------------------------------------------------------------------------------------------- Key: OPENJPA-1680 URL: https://issues.apache.org/jira/browse/OPENJPA-1680 Project: OpenJPA Issue Type: Bug Components: tooling Affects Versions: 2.0.0 Environment: Mac OSX java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) Reporter: Benjamin Renaud When running the mapping tool (though IJ's Maven integration and the OpenJPA Maven plugin, goal openjpa:sql), the tool seems to get confused by two things: 1. If there is a single persistence unit in persistence.xml, it will ignore the schema name if there is only a schema parameter in the annotation: @Table(schema = "foo") @Entity public class Bar { } Will generate the SQL that is not correctly scoped for schema foo. If there is both a schema name and a table name: @Table(schema = "foo", name = "baz") @Entity public class Bar { } The generated sql will be correct (i.e. foo.baz) 2. If persistence.xml contains two PUs (let's say foo and bar in that order), all generated tables appear to be scoped to bar and none to foo despite annotations to the contrary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.