,
Simon
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On
Behalf Of 371c
Sent: 30 March 2011 16:00
To: sqlalchemy
Subject: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could not find
table with which to generate a foreign key
Actually
help ...
I'm not sure if it's the cause of your problem, but you have a typo in
tablemeta - your __init__ only has 1 underscore at the beginning...
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Jacques Naude
Sent: 17 March 2011 12:32
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] In-memory object duplication
Hi, Simon
Thanks for the quick response
on, you're adding
it to the list a second time.
Hope that helps,
Simon
--
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
:
http://www.sqlalchemy.org/docs/core/expression_api.html#sqlalchemy.sql.e
xpression.select
eg.
select([products.c.Group, products.c.Code, price.c.ListPriceEx],
from_obj=[prod.join(price)])
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google
Warwick Prince wrote:
Hi Simon
Thanks for that - I knew it was something wrong with the approach but
simply could not pick it!Back to the test bench for another go :-)
Cheers
Warwick
P.S. OK - I have to ask - when and how (why?) do I do the .join on
the query? ;-)
In SQL
*shrugs* it might be tricky ensuring that return types for all those
operations are adequate, though that might not be necessary assuming psycopg2
does what the end user wants here.
My main problem is that table reflection returns the point type as a
NullType, and my code needs to know
On Sep 12, 12:46 am, Michael Bayer mike...@zzzcomputing.com wrote:
OK, sure. beyond that though do queries with the column and such do whats
expected?
Just tried this morning, and it works as expected, create / update
statements work fine. It seems psycopg2 takes care of everything.
-Sw.
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com]
On Behalf Of Andrey Semyonov
Sent: 10 September 2010 14:35
To: sqlalchemy
Subject: [sqlalchemy] Re: Python's reserved keywords as column names
On 10 сен, 17:15, King Simon-NFHD78 simon.k
-shouldntithaveloadedFoowithid7
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options
don't know how you fix this if you want to continue using the
version_id_col feature - is there any chance that you could do without
it (perhaps by implementing similar functionality in a SessionExtension
which only gets attached to the primary session)?
Simon
--
You received this message because you
-to-many relationship is not really contained
in the schema.
Thanks, Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy
That was exactly what I was looking for. Thanks a lot :-)
Simon
On 21 Aug., 19:57, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 21, 2010, at 12:05 PM, simon wrote:
Hi all,
For a given declaratively mapped class in SA 0.6, how do I
programmatically find out all other mapped
documented, but the source is
pretty simple. If you only want to know if the attribute has changed,
you can call the 'has_changes' method. You can look at the 'added' and
'deleted' properties to get the before and after values.
Hope that helps,
Simon
[1]
http://www.sqlalchemy.org/docs/reference
://www.sqlalchemy.org/docs/mappers.html#deferred-column-loading
You can mark certain columns as not to be loaded until they are
accessed. This can be done at mapper definition time as well as at query
time.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group
())
# MainScript1.py
import ModelClasses
db = ModelClasses.initdb(my_connection_string)
# access db.Table1, db.Base etc.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com
. For example, you can't use plain Python 'and', or
assume that 'self.enabled' evaluates to True or False. I think something
like this would work though:
@hybrid
def is_visible(self):
return (self.enabled == True) (self.is_deleted == False)
Hope that helps,
Simon
--
You received
know anything
about it.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options
://www.sqlalchemy.org/docs/metadata.html#specifying-the-schema-name
(Probably need to use __table_args__ if you are using declarative)
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch
http://www.sqlalchemy.org/docs/session.html#cascades
http://www.sqlalchemy.org/docs/ormtutorial.html#deleting
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com
'
column = getattr(table.c, colname)
update = table.update(column=='project-name', values =
{test:'program'})
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer
Sent: 03 June 2010 19:38
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] SA on MySQL 3.23
On Jun 3, 2010, at 1:15 PM, King Simon-NFHD78 wrote:
Hi
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer
Sent: 04 June 2010 14:42
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] SA on MySQL 3.23
On Jun 4, 2010, at 6:54 AM, King Simon-NFHD78 wrote
sqlalchemy.ext.sqlsoup import SqlSoup
meta = sa.MetaData('db://user:passw...@host/database')
meta.reflect()
db = SqlSoup(meta)
for table in meta.sorted_tables:
cls = db.entity(table.name)
print cls
print cls.get(1)
Hope that helps,
Simon
Hope that helps,
Simon
--
You received this message because
function was added in 4.0.2.
Is there any way that I can avoid this error? Perhaps with some engine
or dialect option that configures the returns_unicode_strings attribute
without running the test?
Thanks a lot,
Simon
--
You received this message because you are subscribed to the Google Groups
and implement whatever transaction
management features you want in your own middleware.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group
still ask SQLAlchemy to use a
different name for the column, as demonstrated in
http://www.sqlalchemy.org/docs/mappers.html#customizing-column-propertie
s
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
the old session back again,
rather than creating a new one.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr
classes. Can I still use MapperExtensions?
The declarative docs include an example of using a MapperExtension:
http://www.sqlalchemy.org/docs/reference/ext/declarative.html#mapper-con
figuration
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group
', ['x','y','z',['m','n','o']]]
If anyone can point me in the right direction, I'd much appreciate it.
Thanks.
If you make the column a PickleType:
http://www.sqlalchemy.org/docs/reference/sqlalchemy/types.html#sqlalchem
y.types.PickleType
...it should behave as you want.
Simon
--
You
that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
not always be what you want.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr
be too bad.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
-asked-questions
Basically, in your FindFriends method, replace:
session = Session()
with:
session = Session.object_session(self)
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
/sqlalchemy/browse_thread/thread/7f950b628
d7ebee5/4421b272d4c7f91f
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email
://www.sqlalchemy.org/docs/metadata.html#reflecting-tables
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr
()
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit
parameters in the relation
were strings? I would be surprised if you got the exception you
described (expression 'Country' failed to locate a name ) if you had
done that, because SA wouldn't be trying to look up that name.
Simon
--
You received this message because you are subscribed to the Google
thought that you'd actually want to write this:
# change the first address
prof.addresses[0].email_address = pr...@marvel.com
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch
Mike Driscoll wrote:
On Feb 4, 8:30 am, Mike Driscoll kyoso...@gmail.com wrote:
On Feb 4, 4:24 am, King Simon-NFHD78 simon.k...@motorola.com
wrote:
[SNIP]
Not a serious blunder, but I think there may be a small
mistake in part
2, where you describe updating an email address
Mike Driscoll wrote:
Thanks Simon! That made sense. I've fixed my example to match what you
said. Sorry about that.
- Mike
No problem. I'm afraid you still have a typo though. You have:
addresses[0].email_address = Address(pr...@marvel.com)
Whereas you want:
addresses[0
class in a place where SA is
expecting a column expression. I think we'd need to see the command that
you actually typed in to work out what the problem is.
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
that all subsequent
argument dictionaries are compatible with that statement.
I think a check has been added in 0.6 so that an exception is raised if
you don't follow this advice.
Hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy
#synopsis
You'll have to give it a table name, which will have the effect of
defining a Table object even though no such table exists in the
database, but I don't think this matters. Then you could use the query
that Mike suggested to actually retrieve rows.
Hope that helps,
Simon
--
You
__call__(self, *args, **kwargs):
return Session.query(*args, **kwargs)
class Comments(Base):
query = Session.query_property(query_cls=CallableQuery)
...but I'm still not sure what the point is.
Simon
--
You received this message because you are subscribed to the Google Groups
the time...
cheers,
Chris
I think you can use bind parameter objects for this:
http://www.sqlalchemy.org/docs/sqlexpression.html#bind-parameter-objects
...and use the query's params method to supply the values.
Hope that helps,
Simon
--
You received this message because you
parameter, which you can hopefully pass
on to the _do_translation function.
I hope that helps,
Simon
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group
(tot_amount, x.id).
filter(x.datefromdate).filter(x.datetodate).
.group_by(x.id)
.order_by(tot_amount)
.limit(5)
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
?
You can argue just as easily that the null primary key means
the record is incomplete and should not be available. It's an
application code issue.
According to http://www.sqlalchemy.org/trac/wiki/06Migration the flag
will be turned on by default in 0.6
Simon
,
Simon
--~--~-~--~~~---~--~~
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
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 15:38
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: Declerative Relation trouble
Hi Simon,
(I do things a little
, (Simon) what version of
python are you using?
2.5.1 on Linux
Simon
--~--~-~--~~~---~--~~
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
Hi All,
bad problem
I have trouble making relations in SQLA. My code runs on Simons
computer but his (and mine) not.
I downgraded SLQA from 0.5.6. to 0.5.5 to have the same
version, still
no luck.
I run Python 2.6.2 and Simon 2.5.1 Downgrading Python is a hassle
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling
Sent: 15 October 2009 16:27
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: [runs one one installation not on
the other] Declerative Relation trouble
-the-schema-na
me
Hope that helps,
Simon
--~--~-~--~~~---~--~~
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
://techspot.zzzeek.org/?p=13
It even uses Addresses as the example. It's quite old, so some of the
syntax will probably need updating, but the basic idea should still
hold.
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
for an example.
Hope that helps,
Simon
--~--~-~--~~~---~--~~
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
,
Simon
--~--~-~--~~~---~--~~
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
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Crusty
Sent: 24 September 2009 16:16
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: unexpected chained relations and
append behaviour
Hello Simon,
thanks
aren't expecting it is a bad idea.
Instead you would use car.parts.count().
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
of your question, but as far as finding out what the
old parent was, could you use the get_history function?
http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html#sqlalchemy
.orm.attributes.get_history
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received
= [c for c in table.primary_key.columns]
query = sa.select(key_cols)
print query.execute().fetchall()
Or
print connection.execute(query).fetchall()
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Eloff
Sent: 08 September 2009 21:34
To: sqlalchemy
Subject: [sqlalchemy] Re: How to bypass scoped_session?
On Sep 8, 3:47 am, King Simon-NFHD78 simon.k...@motorola.com
wrote
also included a couple of extra features (the 'query'
property and a default __init__) which you can recreate yourself using
the examples at
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionAwareMapper
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received
=True) to prevent the merge
from querying the database again.
Hope that helps,
Simon
--~--~-~--~~~---~--~~
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
that helps,
Simon
--~--~-~--~~~---~--~~
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
to a Column, you should get the behaviour you want.
Hope that helps,
Simon
--~--~-~--~~~---~--~~
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
not sure if
it's the sort of thing that SA should do automatically.
Simon
--~--~-~--~~~---~--~~
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
the type will be the same as the
column that the key is pointing at.
eg.
sa.Column('child_id', None, sa.ForeignKey'objects.id',
ondelete='CASCADE', onupdate='CASCADE'), primary_key=True)
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you
actually modify your object,
so it shouldn't appear in session.dirty. (It should appear in
session.new though)
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
think it should be fine.
ie.
class MyClass(Base):
__tablename__ = 'my_table'
id = Column(Integer, primary_key=True)
name = Column(String, nullable=False)
type = Column(String, nullable=False)
Index('ix_name_type', MyClass.name, MyClass.type, unique=True)
Simon
ever
happened is that the sequence has moved on (see the note at the bottom
of http://www.postgresql.org/docs/8.1/static/functions-sequence.html)
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of darkblueB
Sent: 19 August 2009 02:58
To: sqlalchemy
Subject: [sqlalchemy] Re: new questions
Hi Simon
thanks for the reply.. Your second part is straightforward..
The first
layer and not need the
ORM. However, if you need to do much more than basic manipulation of the
data, the ORM can make your life much easier.
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
something like column.label('newcol'). For example:
import sqlalchemy as sa
print sa.select([atable.c.acolumn.label('newcol')])
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
.0x...7ecL [1]
Getting master again via query.get
Finished
So query.get doesn't issue a query, but master.details[0].master
does. Is there any way of making the backref use query.get, and thereby
use the identity map?
Thanks a lot,
Simon
(sa.Integer, sa.ForeignKey(Master.id))
to
master_id = sa.Column(sa.Integer,
sa.ForeignKey(Master.__table__.c.id))
...and now it seems to work! So is this a bug?
Thanks,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Michael Bayer wrote:
King Simon-NFHD78 wrote:
to
master_id = sa.Column(sa.Integer,
sa.ForeignKey(Master.__table__.c.id))
...and now it seems to work! So is this a bug?
yes, that would be a bug. There are some other scenarios
where this kind
of thing occurs (lazy clause
think of for being cautious about cls.query().
Simon
--~--~-~--~~~---~--~~
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
isjack: 0
When I run your script, I get the correct output, using Python 2.5.1, SA
0.5.4p2, sqlite3 version 2.3.2. Perhaps the bug is in the version of
SQLite that you are using?
What happens if you run your query using the SQLite command-line tools?
Simon
://www.sqlalchemy.org/docs/05/sqlexpression.html#conjunctions
Hope that helps,
Simon
--~--~-~--~~~---~--~~
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
of func.count (untested):
hit_count = func.count(m.Hit.id)
q = (meta.Session.query(m.Hit.referer, hit_count)
.group_by(m.Hit.referer)
.order_by(hit_count.desc())
Simon
--~--~-~--~~~---~--~~
You received this message because you
that do what you want?
Simon
--~--~-~--~~~---~--~~
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
of this is at
http://www.sqlalchemy.org/docs/05/mappers.html#configuring-loader-strate
gies-lazy-loading-eager-loading
Hope that helps,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Marcin Krol
Sent: 28 May 2009 13:57
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: This join does not fill in the collection
Hello Simon,
This answered my
anon)s'. I had hoped that
passing the primary_key parameter to mapper would have solved that, but
it doesn't. I'm not sure why.
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
set up properties on the mapped class. I don't
know of any way that you can mark a text block as a Selectable.
Sorry I can't be more help,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group
:'), it works for me.
Simon
--~--~-~--~~~---~--~~
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
for use in the documentation.
As the post in the TurboGears thread points out, you can easily add
Class.query using the query_property method of the scoped session.
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
is loaded in using the
sqlalchemy.orm.object_session function. So inside your methods, you
should be able to say something like:
session = orm.object_session(self)
I think that should work no matter what session strategy you are using.
Hope that helps,
Simon
('+', a, b)
I think that should work.
Simon
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Ashish Bhatia
Sent: 25 February 2009 13:26
To: sqlalchemy
Subject: [sqlalchemy] Re: Creating SQL Expression
The problem is still
the tables for which I have altered the definitions using
the Table object.
I'm using SQLAlchemy '0.5.0beta3', with Python 2.5 on Mac OS X.
Thanks,
Mike
You may like to have a look at the SQLAlchemy Migrate project:
http://code.google.com/p/sqlalchemy-migrate/
Hope that helps,
Simon
that make
any sense?
Simon
--~--~-~--~~~---~--~~
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
and Author classes. You can then use the 'associationproxy'
extension to hide the details.
See the docs at
http://www.sqlalchemy.org/docs/05/mappers.html#association-pattern and
http://www.sqlalchemy.org/docs/05/reference/ext/associationproxy.html#as
sociationproxy
Hope that helps,
Simon
Would None (ie. SQL NULL) be a valid polymorphic identity?
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer
Sent: 30 January 2009 17:06
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re:
, 2009, at 12:19 PM, King Simon-NFHD78 wrote:
Would None (ie. SQL NULL) be a valid polymorphic identity?
it becomes that issue where we just need some kind of constant to
represent THIS_IS_NOT_DEFINED, so that we know when
polymorphic_identity is defined or not. it's
701 - 800 of 921 matches
Mail list logo