[ http://jira.andromda.org/browse/HIB-117?page=all ] Carlos Cuenca closed HIB-117: -----------------------------
Fix Version: 3.2-RC1 Resolution: Fixed I had commited a solution for this. To define a default schema name use: "schemaName" property under the "default" namespace To define a different schema name for a entity use: @andromda.persistence.schema tagged value Different schema names on inheritance is allowed The property "hibernateDefaultSchema" no longer exists and should be changed to "schemaName" Schema support is on metafacades so it will be available to other cartridges like EJB > Hibernate Cartridge support for database schemas > ------------------------------------------------ > > Key: HIB-117 > URL: http://jira.andromda.org/browse/HIB-117 > Project: Hibernate Cartridge > Type: New Feature > Versions: 3.1-RC1 > Environment: j2sdk-1.4.2_08, maven-1.0.2, apache-ant-1.6.2, > Reporter: Diego Bendlin > Assignee: Carlos Cuenca > Fix For: 3.2-RC1 > Attachments: HibernateMetafacadeModel.xml.zip, hibernatePatch.txt > > Hibernate v2 and v3 have support for using database schemas, this is > specially nice when facing the need to "order" the contends of the database > splitting objects among diferente schemas. > Hibernate cound handle this in to levels: > 1.- In the hibernate.cfg.xml qhere the default database schema is to be > specified, and > 2.- In each class mapping file where one can override the settings of the > hibernate.cfg.xml. > Possible solution is to implement a namespace property and a tagged value to > override the default. (Chad says so :-) > This is part of my post in the forum, hope this helps clarify the issue. > The hibernate docs about using schemas are in: > hibernate 2.x > http://www.hibernate.org/hib_docs/reference/en/html/mapping.html > Please refer to sections 5.1.2 hibernate-mapping, 5.1.3 class and 6.2 Mapping > a Collection > hibernate 3.x > http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html > Please refer to sections 6.1.2 hibernate-mappings, 6.1.3 class and 7.2 > Collection mappings > This feature works the same in v2 and v3. > Im almost certainly sure that this feature highly depends on the RDBMS and > the JDBC Driver. (Notice that not all RDBM's have suport for schemas and > there are some RDBMS like MaxDB that have support for schemas but when you > connect to the database your are using some credentials and the schema is > resolved upon your user name, so ones logged in, you are in your users schema > (the one u used to login) and there is no way ("I haven't found the way") > your user can do anything with database objects in other schemas) > After analyzing hibernate docs I think that implementing this feature in > andromda will lead to a namespace property (for the hibernate mapping file) > and to a new tagged value for <<Entity>> classes, but this is just a guess. > Thanks in advance! > Diego Bendlin -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642