[ http://jira.andromda.org/browse/HIB-117?page=comments#action_12329 ] Chad Brandon commented on HIB-117: ----------------------------------
Sounds like a good way to handle it to me. > 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 > > 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 SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click