Michael Bayer wrote:
create a new, empty MetaData instance. redefine=True didnt work so
great since tables have dependencies on each other.
thanks for the answer,
I just saw that redefine is still in the docstring for 0.3s Table class.
robert
On 11/4/06, Rick Morrison [EMAIL PROTECTED] wrote:
Wow, Jet? There's a blast from the past. I would be amazed if you could get
100% of the unit tests to pass, as some of Jet's SQL syntax can vary quite a
bit from ANSI standards.
Did you use an ODBC connector, DAO or ADO? A general-purpose
OK, i had the impression you were switching the mapper inside of a
relation() somehow, but it seems all youre doing is sticking a mapper
on a property (i dont quite understand how youd use it ? )
if i understand properly, id just do it this way:
class dbPeople(object):
def fixRace(self,
Thanks for your reply,
OK, i had the impression you were switching the mapper inside of a
relation() somehow, but it seems all youre doing is sticking a mapper
on a property (i dont quite understand how youd use it ? )
I want to use it like this
fixRace(dbPeople, myrace)
Hi,
I'm still experimenting SA features and, once again, I'm stucked with a
relation definition problem.
This is the deal.
Considering this tables definition :
USERS = Table('users', metadata,
Column('id', Integer, primary_key=True),
Column('name', String(255), nullable=False),
)
it all looks fine to me, youd have to show me something more specific.
--~--~-~--~~~---~--~~
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
Here is an attached sample of my problem.
You can create a User, u, and a Folder, f. Assign ownership via a
simple f.owner = u.
You can do an :
objectstore.save(u)
objectstore.save(f)
You can see relations via
print f.owner
print u.objects
But this can not be saved into the database. An
hi there,
i want to create a database in mysql and then use it.
this is what I do:
in the __init__
def __init__( self, connectionstr ):
self.connectionstr = connectionstr
def _checkEngine(self):
if self._db_engine is None:
self._db_engine =
I've attached a file which is a variant to the employees example with
two objectives.
1. Base polymorphic_identity on select criteria (no type column).
2. Use two levels of inheritance.
The first objective seems to be met, but the second is not working
properly. I put in two Managers, two
sqlite's autoincrement feature does not work when you define a
composite primary key. youll have to set the id attribute on each
instance manually before flushing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
if you change your echo to 'debug', or just select straight from your
p_union selectable, youll see these rows:
(5, u'cengineer1', u'cengineer1', u'cengineer1', None,
u'chemical_engineer')
(6, u'cengineer2', u'cengineer2', u'cengineer2', None,
u'chemical_engineer')
(1, u'manager1', None, None,
Tried with a postgresql database and I get another error right in my
metadata.create_all().
I get a SQLError: (ProgrammingError) from postgres telling me I got
something wrong while creating constraint on unexisting key into table
bases.
CREATE TABLE folders (
id INTEGER NOT NULL,
I cannot reply to it because I'm having a 8 hour lag on my posts in
Google groups (no idea why)
I was having problems getting the defaults to the database structure,
after checking get_column_default_string from the ANSI schema creator I
realized that it was wrong to skip the PassiveDefault
Hello,
I'm using sqlalchemy.mod.threadlocal with object mappers and sessions,
works greate sofar;). Now, for the first time, I have the desire to do
something completely different. Select a bool from the database, like
SELECT %s in (SELECT );
% some_id
What is the most straight forward
I need to implement an indexu-style category tree of arbitrary depth:
News Media (64)
Arts and Humanities, Automotive, Business
Recreation Sports (234)
Amusement and Theme Parks, Automotive, Aviation
Reference (32)
Acronyms and Abbreviations, Almanacs, Arts and Humanities
I have a versioned repository of SQL DDL that I'd like to convert to
versioned sqlalchemy models, using the Table(...,autoload=True)
feature.
I suspect it may be a lossy operation to do so, but in the interest of
table documentation, is there a way to render the Table.__repr__() with
for example
__repr__() really annoys me because no matter what i do with it, people
tell me im using it incorrectly. technically, __repr__() is supposed
to return a string that when eval'ed would return the object instance.
which is not realistic for an object like Table since its an enormous
construction.
Randall Smith wrote:
For discussion, consider the Employee, Manager, Engineer example from
the docs. If I were designing the tables, I would not normally have a
type field. I would use the null status of engineer_info or
manager_data to determine the employee type. Or if that data was in
John,
Thanks for the feedback. The code I put up is not part of any real
system. I'm just playing off of the existing examples in the docs and
trying to get comfortable with SA inheritance.
Randall
John M Camara wrote:
Randall Smith wrote:
For discussion, consider the Employee,
19 matches
Mail list logo