-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Problem with same objects in different schema (last cvs)
PostPosted: Sat Dec 10, 2005 5:12 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
There is problem with hibernate tools when exists two object with same name in different (oracle)
schema (select default schema or schema in reveng file don't help)

tools claim that exists column mapping for tabel already

this code is problem (JDBCReader.java in tools line 397)
Code:
if ( ("TABLE".equals(tableType) || "VIEW".equals(tableType) /*|| "SYNONYM".equals(tableType) */)
                             // ("SYNONYM".equals(tableType) && isOracle() ) ) { // only on oracle ? TODO: HBX-218
                           // it's a regular table or a synonym

                                // ensure schema and catalogname is truly empty (especially mysql returns null schema, ""
                                        if(schemaName!=null && schemaName.trim().length()==0) {
                        schemaName = null;
                    }
                    if(catalogName!=null && catalogName.trim().length()==0) {
                        catalogName=null;
                    }
                                        log.debug("Adding table " + tableName + " of type " + tableType);
                                        progress.startSubTask("Found " + tableName);
                                Table table = dbs.addTable(quote(getSchemaForModel(schemaName)), getCatalogForModel(catal
                                table.setComment(comment);
                        }


This set schema to null and tools try map object (table/view) twice.
This is workaround for any mysql bug, but introduce bug for correct schema aware database

regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 5:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it should only set to null if the object is found in the default schema as specified in the settings...

tables found in other schemas should keep their schema...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 5:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
doh - i just reproduced it...going in for a fix

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 5:37 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
fixed in cvs

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 10, 2005 7:31 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
sf don't refresh cvs.I can't try for now


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.