Thank you for the fast reply and the fix!
I case somebody encounters this problem and doesn't want from a
checkout, workarounds are:
In the init of the Example class, access the point or set to None:
class Example(Base):
__tablename__ = 'example'
id = Column(Integer, primary_key=True)
On Dec 7, 2011, at 11:08 PM, kris wrote:
Hmm, I think I want the opposite behavior. I was the defualt mapper to
Resource unless a more specific mapper has been defined.
I never defined a 'C' or 'D' and I would like simple get a Resource when no
better mapper is found.
i.e. I get
the recipe is broken, please wait until i have time to fix it, thanks.
On Dec 8, 2011, at 11:27 AM, Michael Bayer wrote:
On Dec 7, 2011, at 11:08 PM, kris wrote:
Hmm, I think I want the opposite behavior. I was the defualt mapper to
Resource unless a more specific mapper has been
OK it works (not yet in tip though).
On Dec 8, 2011, at 11:43 AM, Michael Bayer wrote:
the recipe is broken, please wait until i have time to fix it, thanks.
On Dec 8, 2011, at 11:27 AM, Michael Bayer wrote:
On Dec 7, 2011, at 11:08 PM, kris wrote:
Hmm, I think I want the opposite
Does this mean I can use this in 7.3? or Do I need to download tip?
Also could you show me how this would work with old style mapper(...) s
instead of declarative_base?
Thanks,
Kris
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this
Hey all, I just created a meetup group in Vancouver BC for Pyramid and
Pylons users. I'm wondering if I should really make it
Pyramid/Pylons/SQLAlchemy. At any rate, SA certainly seems to be the most
popular persistence mechanism for Pyramid. If you're in Van, I'd love to
hear from you.
works in 0.7.3. will also work in 0.7.4 Just not the current tip at the
moment.
the regular mapper() setup is equivalent (see
http://www.sqlalchemy.org/docs/orm/mapper_config.html#classical-mappings) :
discriminator_expr = case(...)
mapper(Person, ..., polymorphic_on=discriminator_expr,
I've been beating my head over this one. I read the ORM Creating a
Thread-local Context doc and the web but don't see a simple
answer...saw some old SA/Cherrypy code that used cherrypy 'tools' etc.
The SA doc seems straightforward but I keep getting
sqlalchemy.exc.UnboundExecutionError errors.
On Dec 8, 2011, at 4:26 PM, John Hufnagle wrote:
I've been beating my head over this one. I read the ORM Creating a
Thread-local Context doc and the web but don't see a simple
answer...saw some old SA/Cherrypy code that used cherrypy 'tools' etc.
The SA doc seems straightforward but I keep
On Dec 8, 2011, at 4:55 PM, Michael Hipp wrote:
I'm getting a dirty indication on a particular ORM object from
session.is_modified(rec, passive=True) and also that same rec shows up in
session.dirty. But I can't figure out where/how it's been modified. Is there
some way to determine up
Just a little detail...
To get the class of a regular relationship, I use a class_mapper:
def getClassOfRelationship(cls, name):
retval = None
mapper = sqlalchemy.orm.class_mapper(cls)
try:
prop = mapper.get_property(name)
if
Thanks Michael,
Could not find a hidden Session object.
So I broke it down into a problem that works/doesn't work based on
files separation
1. If I place all of the code into one file all_in_one.py which
contains the cherrypy startup, the SA init code and ORM object and the
cherrypy REST
On 2011-12-08 4:11 PM, Michael Bayer wrote:
On Dec 8, 2011, at 4:55 PM, Michael Hipp wrote:
I'm getting a dirty indication on a particular ORM object from
session.is_modified(rec, passive=True) and also that same rec shows up in
session.dirty. But I can't figure out where/how it's been
I can't figure out how.
I have the following setup:
...
engine = create_engine(...)
session = scoped_session(sessionmaker(..., bind=engine))
...
session.add(object)
session.commit()
What I need is to add this object *to the database*, and then select
it in some non-sql-alchemy code, and then
Please disregard this; I've solved it.
On Fri, Dec 9, 2011 at 11:18 AM, Noon Silk noonsli...@gmail.com wrote:
I can't figure out how.
I have the following setup:
...
engine = create_engine(...)
session = scoped_session(sessionmaker(..., bind=engine))
...
session.add(object)
Hi John:
The following import is causing that error.
from sqlalchemy.orm import session, Session
In the all-in-one example you provided, you later go on to reassign
'session' and 'Session', replacing those imported values with your own
values.
Session =
[hmmm, let's try that again... not sure why gmail mangled my email]
Hi John:
The following import is causing that error.
from sqlalchemy.orm import session, Session
In the all-in-one example you provided, you later go on to reassign
'session' and 'Session', replacing those imported values
Thanks!
That was it.
My weak Python understanding was my downfall!
On Dec 8, 11:06 pm, Diana Clarke diana.joan.cla...@gmail.com wrote:
[hmmm, let's try that again... not sure why gmail mangled my email]
Hi John:
The following import is causing that error.
from sqlalchemy.orm import
18 matches
Mail list logo