On Oct 5, 2007, at 3:29 AM, Moo wrote:

>
> I guess this error occured at the second reflection by foreign keys.
> So I modified oracle.py to convert 'table_name' from unicode to
> string, no error occured and finally I got 'unicode'.
> Below is the patch I modified. Could you inspect this?
>
> -----------------------------------------------------------------
> --- databases/oracle.py.orig  Fri Oct 05 14:51:18 2007
> +++ databases/oracle.py       Fri Oct 05 14:48:46 2007
> @@ -409,9 +409,14 @@
>          if name is None:
>              return None
>          elif name.upper() == name and not
> self.identifier_preparer._requires_quotes(name.lower()):
> -            return name.lower()
> +            normalized_name = name.lower()
>          else:
> -            return name
> +            normalized_name = name
> +
> +        if self.convert_unicode:
> +            return normalized_name.encode(self.encoding)
> +        else:
> +            return normalized_name
>
>      def _denormalize_name(self, name):
>          if name is None:
> -----------------------------------------------------------------

it looks pretty good, but im curious what kind of schema youre  
reflecting here and what encoding youre using....in my experience I  
haven't been able to get an oracle database to use table/column names  
in anything other than straight ASCII.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to