[Lift] Schemifier broken for Oracle

2010-01-13 Thread aw
I'm pretty sure that I discovered that a bug was introduced that
breaks Schemifier with Oracle...

First of all, Oracle's JDBC driver has the odd behavior of being case
sensitive when it comes to acquiring metadata.  For example:
DatabaseMetaData.getColumns(null, MYSCHEMA, MYTABLE, null) is not
the same as DatabaseMetaData.getColumns(null, MYSCHEMA, myTable,
null)...  In fact, the latter option yields no results...

Well, looking at 1.0 Schemifier source, see line 189:
  
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Schemifier.scala.htm
You can see that it used:  table.dbTableName

If you look at the latest source, see line 193:
  
http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Schemifier.scala#L193
You can see that it uses:  table._dbTableNameLC

This change broke ensureColumns for Oracle.

As a side note -- there was no useful error message explaining that no
column metadata was found for table X.  This took a while to trace.

I must admit that I am surprised by Oracle's behavior.  Since the
database isn't case sensitive, the table name parameter should not be
case sensitive -- but it certainly is by my testing (and I am using
11g).

Why was the code changed to specify a lower case value?
-- 
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Schemifier broken for Oracle

2010-01-13 Thread David Pollak
Please try with Lift 2.0-SNAPSHOT.  We made a number of significant fixes to
Schemifier over the course of the year including improving support for
case-sensitive RDBMS.

On Wed, Jan 13, 2010 at 6:54 PM, aw anth...@whitford.com wrote:

 I'm pretty sure that I discovered that a bug was introduced that
 breaks Schemifier with Oracle...

 First of all, Oracle's JDBC driver has the odd behavior of being case
 sensitive when it comes to acquiring metadata.  For example:
 DatabaseMetaData.getColumns(null, MYSCHEMA, MYTABLE, null) is not
 the same as DatabaseMetaData.getColumns(null, MYSCHEMA, myTable,
 null)...  In fact, the latter option yields no results...

 Well, looking at 1.0 Schemifier source, see line 189:

 http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/Schemifier.scala.htm
 You can see that it used:  table.dbTableName

 If you look at the latest source, see line 193:

 http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Schemifier.scala#L193
 You can see that it uses:  table._dbTableNameLC

 This change broke ensureColumns for Oracle.

 As a side note -- there was no useful error message explaining that no
 column metadata was found for table X.  This took a while to trace.

 I must admit that I am surprised by Oracle's behavior.  Since the
 database isn't case sensitive, the table name parameter should not be
 case sensitive -- but it certainly is by my testing (and I am using
 11g).

 Why was the code changed to specify a lower case value?

 --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.






-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
-- 

You received this message because you are subscribed to the Google Groups "Lift" group.

To post to this group, send email to lift...@googlegroups.com.

To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.