Hello,
What do you mean by real value? You've got 2 perfect Category
objects associatied with your Item,
mosst.model.page.Category object at 0x020F67B0 - is just a string
stamp of the object when converted to a string.
you may want something like this: item.categories[0].name to access
the name
Hi,
I've the following which generates an insert:
try:
MyDBLog(
myfield='A too long string '
)
except Exception, e:
log.error(Exception occurred with database logging: %s % e)
Unfortunately, 'myfield' is (for example) a string of only length 10,
so the session
Thanks i got that already solved.
2008/9/11 Alex K [EMAIL PROTECTED]
Hello,
What do you mean by real value? You've got 2 perfect Category
objects associatied with your Item,
mosst.model.page.Category object at 0x020F67B0 - is just a string
stamp of the object when converted to a string.
I don't know of a way to do what you're asking. However, you could simply
create your own constructor for MyDBLog which truncates the string if it is too
long.
Barry
- Original Message
From: Eoghan Murray [EMAIL PROTECTED]
To: sqlalchemy sqlalchemy@googlegroups.com
Sent: Thursday,
Depending on how your code is layed out you could wrap your
session.flush() with a try:/catch I do something like this:
session.begin()
try:
...
session.flush()
session.commit()
except:
session.rollback()
Eoghan Murray wrote:
Hi,
I've the following which generates an insert:
I should mention that in my case, my sessions are non-autoflush, and
non-transactional, so I do my begin()/commits() explicitly.
David Gardner wrote:
Depending on how your code is layed out you could wrap your
session.flush() with a try:/catch I do something like this:
session.begin()
try:
Ok, another thing on the subject:
It looks like that does not work before a commit. Even a flush doesn't
help:
t1 = Tile(id=1)
t2 = Tile(id=2)
t3 = Tile(id=3)
t4 = Tile(id=4)
session.add_all([t1, t2, t3, t4])
session.flush()
assert t2.neighbors == [t1]
FAIL
I'd really like to use it before
On Sep 11, 2008, at 2:04 PM, GustaV wrote:
Ok, another thing on the subject:
It looks like that does not work before a commit. Even a flush doesn't
help:
t1 = Tile(id=1)
t2 = Tile(id=2)
t3 = Tile(id=3)
t4 = Tile(id=4)
session.add_all([t1, t2, t3, t4])
session.flush()
assert
On Sep 11, 5:42 pm, Michael Bayer [EMAIL PROTECTED] wrote:
Hey list -
I've just put out 0.5rc1. This release is *great*, as I am using it
heavily every day for a project here - it's got my personal seal of
approval. 0.5 truly rocks in general. In my particular
application, I'm
One of the things I really liked about sqlobject was its versioning
plug-in. ( http://www.sqlobject.org/Versioning.html )
Is there anything similar for sqlalchemy? A google search turned up
versioned ( http://elixir.ematia.de/apidocs/elixir.ext.versioned.html
)
This is a plug-in for elixir,
I need sqlalchemy to work on ironpython (1.2 or 2.0b)
sqlalchemy fail on ironpython even with simple use case
like create simple Table definition.
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey
metadata = MetaData()
users_table = Table('users', metadata,
...
Here U Can See Jessica Simpson is a sexy actress.
http://masalastop.blogspot.com/2008/08/jessica-simpson-is-sexy-actress.htmlhttp://masalastop.blogspot.com/2008/09/russian-tennis-player-maria-sharapova.html
**
*DOWNLOAD FREE PC SOFTWARES http://www.pcwala.blogspot.com/*
--
Reminder from: net-trade Yahoo! Group
http://groups.yahoo.com/group/net-trade/cal
Kumpulan Trik dan Rahasia Gratis Seputar Paypal
Friday September 12, 2008
12:00 pm - 1:00 pm
(This event repeats every day.)
Notes:
Hallo Netter Indonesia,
Warga Indonesia sdh bisa tarik Paypal langsung ke Bank
13 matches
Mail list logo