Hi all
I found following strange problem in Elixir, I want to use
query.from_statement to create a custom query to DB (multiple joins
with group by; it is much easier to do with plain SQL then with SQL
Alchemy magic) as a result I get problems when results get mapped to
the fields of my entity

Code (simplified query):

products = model.Product.query.from_statement("select * from product")
title = "Product %s(company=%s) changed" % (product.name,
product.company.name)

Exception

<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
byte 0xd0 in position 8: ordinal not in range(128)

Equivalent code:
products = model.Product.query.all()
title = "Product %s(company=%s) changed" % (product.name,
product.company.name)

works fine,

All fields in entity are of Unicode type, seems like they are get
converted to string not to the unicode during mapping

Any ideas about how to get it work?
I have 0.4.5 SA and Elixir 0.5.2 installed, DB is PostgreSQL

Thanks in advance for any help

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

Reply via email to