Starting with r2598, I'm seeing some failures with how I'm using the
association proxy. I've modified the
examples/association/proxied_association.py file which duplicates the
problem.
It is possible that I'm not suppose to remove associations like I am.
But it did work before (in 0.3.7 and
Ive added ticket #597 for this.
On Jun 12, 2:22 am, Paul Kippes [EMAIL PROTECTED]
wrote:
Starting with r2598, I'm seeing some failures with how I'm using the
association proxy. I've modified the
examples/association/proxied_association.py file which duplicates the
problem.
It is possible
Would you write a failing test for this condition? I looked at the
unit tests but wasn't able to make a failing test. So that is why I
modified the example.
I also tried to formulate a work around. And failed at that as well.
On 6/12/07, Michael Bayer [EMAIL PROTECTED] wrote:
Ive added
On Jun 12, 2007, at 11:13 AM, Paul Kippes wrote:
Would you write a failing test for this condition? I looked at the
unit tests but wasn't able to make a failing test. So that is why I
modified the example.
I also tried to formulate a work around. And failed at that as well.
we have a
Cleaning out my inbox...
FWIW I'm +1 on removing the old-style methods, +1 on .first instead of
.scalar, +1 on adding .one, and +0 on renaming .list to .all.
Did you make a decision for 0.4 Mike?
-J
--~--~-~--~~~---~--~~
You received this message because you
On 6/12/07, Michael Bayer [EMAIL PROTECTED] wrote:
we have, in fact, made a tip of the hat to SAT analogy questions
(selecting everything is to all() as selecting just the first row is
to: a. scalar() b. first() c. list()[0]).
I've already said it earlier but since you didn't comment on
Hi,
Anybody knows how I could emulate the behavior of Query.get (ie get
the result from the session if possible instead of always fetching
from the db) if I have the values for the different columns of the
primary as keyword arguments (ie not in the order of the columns of
the initial table)? I
the legal way is the association_proxy and family.
here another shorter ... a hack:
i did have similar need - obj.somerelation.append( left=.., right=..),
so i did monkeypatch the InstrumentedList's append to use the item
returned from collection's append -
def append( self, *args,
actually, I am iterating through all the databases in the meta
ti = model.meta.table_iterator()
for t in ti:
print create %s ? % t
if raw_input(Choose [Y/n]).lower() in ['y','']:
t.create()
I want to be able to chose which database to create from a pool on
Using the association_proxy extension in combination with your
dictionary collection class is an easy way to get this kind of
simplified access. Assuming your Attribute's value is in a
property called 'value', you can set up simple dict access like so:
class Obj(object):
attrs =
Ron wrote:
When I try the above I get this error at flush time:
InvalidRequestError: Class 'str' entity name 'None' has no mapper
associated with it
Here is my dictionary collection_class:
class AttributeDictNEW(dict):
My Attribute Dict
def append(self, item):
The association proxy will take care of Attribute construction for
you, so you can get away with just:
class AttributeDictNEW(dict):
def append(self, item):
self[item.key] = item
def __iter__(self):
return self.itervalues()
So now I if I try to get something
I do not want to cheat anybody. I'm a student and made that web page
in my spare time. My web page GPCapitalGroup.com has spent about 100
hours and my direct costs reach approximatelly $200 only for buying
webhosting and domain.
In case, you would like to buy that web page with or without domain
Hello all
I am experimenting with SA on MSSQL and am having difficulty with
table reflection as outlined in the tutorial, for instance:
from sqlalchemy import *
db = create_engine('mssql://login:[EMAIL PROTECTED]/db')
metadata = BoundMetaData(db)
users_table = Table('users', metadata,
Just tried it here on a Linux + pymssql box and it worked fine.
The 'NoSuchTable' error would indicate that the table is not found, as you
surmised. Check to make sure the table is really persisting after your first
session with the table create. In the meantime, I'll see if I can get
pymssql
one.person
View profile
More options Jun 12, 5:12 pm
From: one.person [EMAIL PROTECTED]
Date: Wed, 13 Jun 2007 00:12:50 -
Local: Tues, Jun 12 2007 5:12 pm
Subject: Re: mssql reflection NoSuchTableError
Reply | Reply to author | Forward | Print | Individual message | Show
original |
Works in Windows, too, sqlalchemy 0.3.8, Python 2.5, pymssql 0.8.0, MSSQL
2005
Try upgrading your pymssql if you're not at 0.8.0. If that won't work, then
I would suggest a switch to pyodbc
Rick
On 6/12/07, one.person [EMAIL PROTECTED] wrote:
one.person
View profile
More
So all of the above was done with Windows XP, Python 2.4.3, pymssql
0.7.4, and MSSQL 2000. I upgraded to pymssql 0.8.0 with the same
results. I uninstalled that and installed pyodbc 2.0.3.6, same
results.
The obvious differences between my installation and yours is that I am
using MSSQL 2000
un 12, 3:59 pm, voltron [EMAIL PROTECTED] wrote:
actually, I am iterating through all the databases in the meta
ti = model.meta.table_iterator()
for t in ti:
print create %s ? % t
if raw_input(Choose [Y/n]).lower() in ['y','']:
t.create()
I want to be
On Jun 12, 9:04 pm, one.person [EMAIL PROTECTED] wrote:
So all of the above was done with Windows XP, Python 2.4.3, pymssql
0.7.4, and MSSQL 2000. I upgraded to pymssql 0.8.0 with the same
results. I uninstalled that and installed pyodbc 2.0.3.6, same
results.
The obvious differences
Thanks for all the quick replies. Currently on pyodbc 2.0.3.6.
Anyway, I tried this (the table 'zones' most definitely exists):
metadata.engine.echo = True
zones_table = Table('zones', metadata, autoload=True)
2007-06-12 18:20:40,924 INFO sqlalchemy.engine.base.Engine.0x..b0 SET
nocount ON
That looks OK to me.
Try pasting that query (cleaned-up) into a query window on Enterprise
Manager and see what kind of results you get. The ? arguments are
positional, so the first would be the table 'zone'; the second the schema
'dbo'.
On 6/12/07, one.person [EMAIL PROTECTED] wrote:
I was converting an older table definition from using an integer
primary key to a string (representation of UUID), and ran into a bit
of strange behavior, where my object instance's String primary key
receives an integer value (which appears to be the internal sqlite
rowid) after a flush. From
Inspired by the SQLAlchemy docs, I'm writing a documentation generator
in python using a combination of epydoc (for parsing/introspection),
genshi (templates), docutils (for restructured text), and pygments
(syntax highlighting).. and I just noticed that the documentation for
classes mapped by
24 matches
Mail list logo