RE: [Hibernate] Quoted schema names...

2005-04-26 Thread Gavin King
I don't think so.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel Bernard
Sent: Monday, 25 April 2005 1:58 AM
To: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Quoted schema names...

Didn't we have some trouble in 2.1.7 with a similar patch?

Aleksandar Vidakovic wrote:

Salut all,

I had problems with schemas containing a dash in the name. SchemaExport
fails e. g. with a schema name like component-security on postgresql
(I'm sure that this is an issue on other DB systems, too). When I
looked
into hibernates source I saw that table names can be quoted with
backticks, but schema names cannot. Is there a reason for this
behaviour...? I admit that I'm new to hibernate... at least concerning
it's source code ;-)

Attached you can find a little patch for the class
org.hibernate.mapping.Table which recognizes quoted schemas.

Cheers,

Aleks
  

---
-

Index: Table.java
===
RCS file:
/cvsroot/hibernate/Hibernate3/src/org/hibernate/mapping/Table.java,v
retrieving revision 1.33
diff -u -r1.33 Table.java
--- Table.java 11 Apr 2005 12:40:40 -  1.33
+++ Table.java 23 Apr 2005 15:04:44 -
@@ -38,6 +38,7 @@
   private Map uniqueKeys = new HashMap();
   private final int uniqueInteger;
   private boolean quoted;
+  private boolean quotedSchema;
   private static int tableCounter = 0;
   private List checkConstraints = new ArrayList();
   private String rowId;
@@ -78,7 +79,7 @@
   public String getQualifiedName(Dialect dialect, String
defaultCatalog, String defaultSchema) {
   if ( subselect != null ) return (  + subselect +  );
   String quotedName = getQuotedName( dialect );
-  String usedSchema = schema == null ? defaultSchema :
schema;
+  String usedSchema = schema == null ? defaultSchema :
getQuotedSchema( dialect );
   String usedCatalog = catalog == null ? defaultCatalog :
catalog;
   return Table.qualify( usedCatalog, usedSchema,
quotedName, dialect.getSchemaSeparator() );
   }
@@ -109,6 +110,12 @@
   name;
   }
 
+  public String getQuotedSchema(Dialect dialect) {
+  return quotedSchema ?
+  dialect.openQuote() + schema +
dialect.closeQuote() :
+  schema;
+  }
+
   public void setName(String name) {
   if ( name.charAt( 0 ) == '`' ) {
   quoted = true;
@@ -435,7 +442,13 @@
   }
 
   public void setSchema(String schema) {
-  this.schema = schema;
+  if ( schema.charAt( 0 ) == '`' ) {
+  quotedSchema = true;
+  this.schema = schema.substring( 1,
schema.length() - 1 );
+  }
+  else {
+  this.schema = schema;
+  }
   }
 
   public String getCatalog() {
  


-- 
Emmanuel Bernard
[EMAIL PROTECTED]
callto://emmanuelbernard

http://www.hibernate.org



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=click
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] Just saw some commits from Steve...

2005-04-26 Thread Steve Ebersole
A fix of a very nasty bug in eager-releasing connections.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Bauer
Sent: Monday, April 25, 2005 11:58 AM
To: hibernate-devel@lists.sourceforge.net
hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Just saw some commits from Steve...


On Apr 25, 2005, at 6:54 PM, Gavin King wrote:

 ...does that mean we can do 3.0.2 tonight / tomorrow?

Whats so important in 3.0.2?



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=ick
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=click
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] connect by

2005-04-26 Thread Gavin King








Should we support START WITH  CONNECT BY in HQL (just
for Oracle users)?



Its trivial to implement I guess, what do you guys
think?








Re: [Hibernate] connect by

2005-04-26 Thread Loïc Lefèvre
+1

And the ORDER SIBLINGS BY ... (Oracle 9i+) too (if possible).


---
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] connect by

2005-04-26 Thread Max Rydahl Andersen
What is the usecases for it ?
Its nonportable, so why put it in HQL when it can be done
via native sql queries where it kinda belongs ?
+0
-max
+1
And the ORDER SIBLINGS BY ... (Oracle 9i+) too (if possible).
---
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

--
--
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
[EMAIL PROTECTED]
http://hibernate.org
JBoss Inc
[EMAIL PROTECTED]
http://jboss.com
---
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] connect by

2005-04-26 Thread Emmanuel Bernard
Not keen. With native SQL you can achieve these specific cases, right?
Gavin King wrote:
Should we support START WITH  CONNECT BY in HQL (just for Oracle users)?
Its trivial to implement I guess, what do you guys think?
--
Emmanuel Bernard
[EMAIL PROTECTED]
callto://emmanuelbernard
http://www.hibernate.org


---
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel