Hi all,
I have this definition of a table.
session = Table('session', database.metadata,
Column('id', Unicode(40), primary_key=True, nullable=False),
Column('data', Text),
Column('expiration_time', TIMESTAMP(timezone=False)),
)
In the PostgreSQL DB, it
Hi all,
Can anybody explain how to relate three tables with a single association
table.
When a delete a row from master table the entries from the child table
should be deleted.
The tables are.
1).
User.
-
User_id
User_name
role
Group
-
group_id
group_name
Project
---
http://www.sqlalchemy.org/docs/orm/extensions/associationproxy.html?highlight=association%20proxy#building-complex-views
http://stackoverflow.com/questions/2310153/inserting-data-in-many-to-many-relationship-in-sqlalchemy/2310548#2310548
--
You received this message because you are subscribed
Thanks NiL,
I reffered the links what u hav given,
There are two tables stocks, brokers and an association table
holdings.
Here I need three tables User, Group, Project and a association table
for three tables user_group_project kind of thing
Thank again for your reply :)
On Thu,
your use case is unclear, maybe you could be more specific on what you
want to achieve
--
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
Just a wild guess, but have you tried making your association table like:
#association table
user_group_table = Table('t_user_group', metadata,
Column('user_id', Integer, ForeignKey('t_user.c.user_id',
onupdate=CASCADE, ondelete=CASCADE)),
Column('group_id', Integer,
http://www.sqlalchemy.org/docs/orm/extensions/associationproxy.html#building-complex-views
Can anybody explain how to relate three tables with a single association
table.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group,
Hi
With sqlalchemy 0.7b1 and postgresql
if you define a BigInteger type for a primarykey, the SQL generated for
CREATE TABLE is a 'serial' and not a 'bigserial'.
(I am generating the sql using pylons)
I just started using sqlalchemy and not sure if this is a bug, but thought I
should notice you.
yes that is a bug, a regression from 0.6 where you'll get BIGSERIAL. ticket #
2065 is added thanks for the report !
On Feb 17, 2011, at 6:35 AM, Hayato ARAKI wrote:
Hi
With sqlalchemy 0.7b1 and postgresql
if you define a BigInteger type for a primarykey, the SQL generated for
CREATE
SQLAlchemy ResultProxy is set up by the cx_oracle dialect to add the
sqlalchemy.dialect.oracle.CLOB type into any result set with a CLOB which
intercepts cx_oracle's LOB and converts to a stream. If you are using a
SQLAlchemy engine and not the cx_oracle cursor directly you should not be
the stack trace tells all for autoflush situations. Note this is an 0.7
stacktrace, 0.6 is slightly different but the same series of steps:
File test.py, line 107, in module
group = Group([item1, item2])
File string, line 4, in __init__
File
Great, thanks a lot!
On Feb 17, 7:05 pm, Michael Bayer mike...@zzzcomputing.com wrote:
the stack trace tells all for autoflush situations. Note this is an 0.7
stacktrace, 0.6 is slightly different but the same series of steps:
File test.py, line 107, in module
group = Group([item1,
Hello everyone!
Let's say I have a class defined like this:
class User(declarativeBase):
Represents a user
__tablename__ = users
_id = Column(id, Integer, primary_key=True)
_phone = Column(phone, String(16))
_userName = Column(user_name, String(50),
Can someone help me understand why DDL seems to not be transactional here:
import sqlalchemy
e = sqlalchemy.create_engine('sqlite://')
c = e.connect()
t = c.begin()
c.execute(CREATE TABLE foo (bar INTEGER))
t.rollback()
assert u'foo' in e.table_names() # True
But, if I start up `sqlite3 db.db`
On Feb 17, 2011, at 9:48 PM, Daniel Holth wrote:
Can someone help me understand why DDL seems to not be transactional here:
import sqlalchemy
e = sqlalchemy.create_engine('sqlite://')
c = e.connect()
t = c.begin()
c.execute(CREATE TABLE foo (bar INTEGER))
t.rollback()
assert u'foo'
On Feb 17, 2011, at 6:37 PM, Hector Blanco wrote:
Hello everyone!
Let's say I have a class defined like this:
class User(declarativeBase):
Represents a user
__tablename__ = users
_id = Column(id, Integer, primary_key=True)
_phone = Column(phone, String(16))
16 matches
Mail list logo