hi there,
I am using a one to many relation, and would like the result to be ordered by a
field of the child table. however no order by statement is executed when I
access the related property of the parent object.
this is my declaration:
mitarbeiter_table = Table('mitarbeiter',
On Wed, Oct 14, 2009 at 08:34, robert rottermann rob...@redcor.ch wrote:
I am using a one to many relation, and would like the result to be ordered by
a
field of the child table. however no order by statement is executed when I
access the related property of the parent object.
this is my
thanks
robert
Gaetan de Menten schrieb:
On Wed, Oct 14, 2009 at 08:34, robert rottermann rob...@redcor.ch wrote:
I am using a one to many relation, and would like the result to be ordered
by a
field of the child table. however no order by statement is executed when I
access the related
Thx Kyle and Conor,
i finally dit that
s = session.query(Contact.IdContact, Contact.Civilite,
Contact.Nom, Contact.Prenom,
ContactTel.Tel).filter(ContactTel.IdContact==Contact.IdContact).filter(Contact.IdDossier==self.dossierPourChargement.IdDossier)
# s =
Hi All,
I want to implemet View in my project.
I am using sqlalchemy 0.4.4, turbogears1.0.4b3, python 2.5
Thanks
Reetesh Nigam
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this
Hi,
I have a python module where I am implementing several classes.
When I do a metadata.create_all(engine)
every time Mysql trows an exception (1064, PROGRAMMING ERROR), but on
a different table, I think SQLAlchemy is behaving different every time
I run the program.
ie (one of the
Hey, thanks.
I tried to add the encoding parameter with the latin1 value, but it messed
up everything and all of content was shown wrong.
I decided to try to convert my whole DB into UTF-8, but I found out that I'm
not sure how SA converts the gibberish in my DB into Hebrew. After a lot of
trying
Martijn Moeling wrote:
Hi,
I have a python module where I am implementing several classes.
When I do a metadata.create_all(engine)
every time Mysql trows an exception (1064, PROGRAMMING ERROR), but on
a different table, I think SQLAlchemy is behaving different every time
I run the
Hi All,
I'm just wondering what happens if I were to call session.close()
whilst inside a subtransaction? Would it indeed close the session and
abort all of the parent transactions or would it do nothing?
Looking at the code (and I haven't looked at it in any great detail,
sorry) I imagine that
David Gardner wrote:
I have a PostgreSQL function that returns a composite type (a text field
and 6 bigint columns).
Currently I am calling it with:
session.query(Job,func.farm.call_job_status(Job.path)).filter(Job.path=='testshow').first()
Which returns a tuple, but the second element is
mviamari wrote:
Hello,
I'm writing tests for my database, and I've run into a little bit of
confusion.
Say I have a class (we'll call it person) with two declared attributes
that correspond to db columns:
person.id
person.name
If I randomly assign a person object another attribute
Luke Arno wrote:
I have a MSSQL server with two logical databases. (I inherited this
situation,
of course.) There is a table in each database and an association table in
one of them. What is the right way to configure this? Here is what I have
and
it complains about the values in
Thanks Guy's!
Kinda stupid, but that happens with the use of examples.
Martijn
On Oct 14, 2009, at 3:34 PM, limodou wrote:
On Wed, Oct 14, 2009 at 9:03 PM, Martijn Moeling mart...@xs4us.nu
wrote:
Hi,
I have a python module where I am implementing several classes.
When I do a
Oliver Beattie wrote:
Hi All,
I'm just wondering what happens if I were to call session.close()
whilst inside a subtransaction? Would it indeed close the session and
abort all of the parent transactions or would it do nothing?
Looking at the code (and I haven't looked at it in any great
On Tue, Oct 13, 2009 at 16:49, Michael Bayer mike...@zzzcomputing.com wrote:
We have a situation where we have an existing ScopedSession, but want
to change its scopefunc. This sounds like a strange requirement, it
is because we use elixir - the issue is discusses here:
On Wed, Oct 14, 2009 at 17:09, Gaetan de Menten gdemen...@gmail.com wrote:
Btw: Iwan, did you try:
factory = elixir.session.session_factory
elixir.session.registry = sqlalchemy.util.ScopedRegistry(maker,
scope_func=your_scope_func)
Of course, that should read :
factory =
I was under the impression that returning EXT_STOP in my
MapperExtension.before_insert() can prevent an object from being
inserted into the database altogether, but that doesn't seem to be
working, so I'm not sure if I'm misunderstanding the operation of
MapperExtensions or it's a bug.
I'd like
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Luke Arno
Sent: 14 October 2009 16:41
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: ORM Many to Many Across Two Databases
It looks like if I put the relation on the
I have a composite type that I defined as:
CREATE TYPE farm.job_status_ret AS
(total bigint,
valid bigint,
invalid bigint,
processing bigint,
pending bigint,
canceled bigint);
I dropped the text field. When I run the query in postgres I get the six
distinct fields:
bojanb wrote:
I was under the impression that returning EXT_STOP in my
MapperExtension.before_insert() can prevent an object from being
inserted into the database altogether, but that doesn't seem to be
working, so I'm not sure if I'm misunderstanding the operation of
MapperExtensions or
David Gardner wrote:
I have a composite type that I defined as:
CREATE TYPE farm.job_status_ret AS
(total bigint,
valid bigint,
invalid bigint,
processing bigint,
pending bigint,
canceled bigint);
I dropped the text field. When I run the query in postgres I get
Thanks, Simon. Good suggestion, but these are databases and not
schema within a database. If I use the schema=MyDatabase. (
notice the .) and quote_schema=False, the table names come out
like I want, but look at what happens to the label here:
SELECT [LeftTable_1].description AS
Did a quick test using psycopg2 and it returns a tuple of six longs:
(9892718L, 1046L, 189L, 235L, 9890143L, 1105L)
---
import psycopg2
import psycopg2.extensions
DB_HOST = 'localhost'
DB_NAME = 'hdpsdb'
DB_USER = 'testuser'
DB_PASS = 'testuser'
db_uri = dbname='%s'
So, is there any chance that relations across multiple _logical_
databases on a _single_ physical server will be supported by
SQLAlchemy in the future?
As I mentioned before, this could work (at least for MSSQL)
if we only had a databasename=foo on Table(). I am not
really sure how much work it
it does not.
http://www.sqlalchemy.org/docs/05/reference/orm/interfaces.html?highl...
Returning EXT_STOP will halt processing of further extensions handling
that method.
that only refers to additional extensions.
Right. The doc was a little ambigous - the or use the default
functionality
Luke Arno wrote:
So, is there any chance that relations across multiple _logical_
databases on a _single_ physical server will be supported by
SQLAlchemy in the future?
that is supported now, via the schema argument to Table, assuming you
are connecting with an account that has access to all
So if I read the documentation right, it appears that because I'm
accessing the object via the primary key, it looks the object up
locally (i.e. in the session) and returns that object. Other than
doing a query/lookup on another attribute, how can I force it to
create the object from the data in
Hi
I have a stored procedure on a mysql server i'm calling.
However, all i can seem to get back are the arguments passed to the
procedure
if i do it using MySQLdb i just use the cursor .nextset() to get the
actual results of the procedure call
Is there a way I can advance the record set to
On Oct 14, 2009, at 8:40 PM, BEES INC wrote:
Hi
I have a stored procedure on a mysql server i'm calling.
However, all i can seem to get back are the arguments passed to the
procedure
if i do it using MySQLdb i just use the cursor .nextset() to get the
actual results of the procedure
Michael,
First, Thanks for your help.
Second, something still isn't right. Here's the code in question:
obj = Obj()
org = Org()
self.assertNotEqual(obj, None)
self.assertNotEqual(org, None)
#Nonsense_var is not representative of a table column,
UPDATE: If I inject a session.expunge_all() before I query the DB for
the objects again, the undeclared attribute is no longer present
(i.e. I get the AttributeError I expect).
On Oct 14, 7:08 pm, mviamari mviam...@gmail.com wrote:
Michael,
First, Thanks for your help.
Second, something
I have a special kind of relation.
Relation = Table(relations, metadata,
Column('src_id',Unicode(50)),
Column('dest_id',Unicode(50)),
Column('relation',Unicode(50))
)
class Node(DeclarativeBase):
__tablename__ = 'nodes'
name = Column(Unicode(50), nullable=False)
32 matches
Mail list logo