It looks like it's not actualy replacing values when using a Query
object and it's methods. Getting this for first() and get()

experts_mapper = mapper(Expert, experts)
currencies_mapper = mapper(Currency, currencies)
inputs_mapper = mapper(Input, inputs, properties={'expert' :
relation(Expert, backref="expert")} )

inputf = session.query(Input).first()
print(inputf.expert)

-----------------------------------------------------------------------

sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1064, "You have
an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '%s, %s' at line
3") b'SELECT inputs.input_id AS inputs_input_id, inputs.expert_id AS
inputs_expert_id, inputs.input_name AS inputs_input_name,
inputs.input_default AS inputs_input_default, inputs.input_start AS
inputs_input_start, inputs.input_step AS inputs_input_step,
inputs.input_end AS inputs_input_end, inputs.input_optimize AS
inputs_input_optimize \nFROM inputs \n LIMIT %s, %s' (0, 1)
File "C:\Users\Bogdan\Desktop\forex\metatester\tester.py", line 33, in
<module>
  inputf = session.query(Input).first()
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\orm\query.py", line 1719, in first
  ret = list(self[0:1])
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\orm\query.py", line 1616, in __getitem__
  return list(res)
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\orm\query.py", line 1788, in __iter__
  return self._execute_and_instances(context)
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\orm\query.py", line 1803, in _execute_and_instances
  result = conn.execute(querycontext.statement, self._params)
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\engine\base.py", line 1358, in execute
  params)
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\engine\base.py", line 1491, in _execute_clauseelement
  compiled_sql, distilled_params
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\engine\base.py", line 1599, in _execute_context
  context)
File "C:\Users\Bogdan\AppData\Roaming\Python\Python32\site-packages
\sqlalchemy\engine\base.py", line 1736, in _handle_dbapi_exception
  from e

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to