Hi List,
I have a table of people, one of Races and a RaceParticipant table that
relate people to races and add a few extra info (e.g. Team, Weight, ...)
All this is working fine and thanks to the power of the ORM, I can do things
like
race.Racers
people.Races
and get the
hi there,
I am wetting my fingers with sqlalchemy (sorry therfore if I sound
thick)
In my unittests I want to recreate the same table object many times.
I used to set redefine=True (twas with 2.8 I think). Now this seems not
to work anymore.
How can I remove a table from an engines metadata?
Or
Is it possible to specify that an ActiveMapper-derived class should
autoload its columns but to override some of those columns (for
example, to set a primary key that wasn't defined in the database)? My
attempts so haven't found any hybrid between fully automatic and fully
manual.
Hamish Lawson
Hi,
I've started on a Jet database engine for sqlalchemy.
I've only just started so at the moment it passes 60% of the unit
tests.
I am doing this because I am limited to a locked down windows machine
with only the Jet engine at my disposal!
Anyway, if I can get the unit test a bit higher
Shannon -jj Behrens wrote:
I'm using convert_unicode=True. Everything is fine as long as I'm the
one reading and writing the data. However, if I look at what's
actually being stored in the database, it's like the data has been
encoded twiced. If I switch to use_unicode=True, which I
Shannon -jj Behrens wrote:
Changing from convert_unicode=True to use_unicode=True doesn't do what
you'd expect. SQLAlchemy is passing keyword arguments all over the
place, and use_unicode actually gets ignored. minor rantI
personally think that you should be strict *somewhere* when you're
this would be exactly the use case for a separate Table and Mapper
definition, and is the entire reason SA takes the approach that it
does. your tables are not your classes !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
by setting signal_enumeration_name to thirty on an in-session
instance, youre modifying a primary key value in place. See the FAQ on
this:
http://www.sqlalchemy.org/trac/wiki/FAQ#asingleobjectsprimarykeycanchangecanSAsORMhandleit
--~--~-~--~~~---~--~~
You
absolutely.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For
create a new, empty MetaData instance. redefine=True didnt work so
great since tables have dependencies on each other.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
Shannon -
im trying to figure a way to make create_engine() behave the way you
want. but let me show you a highly simplified version of how
create_engine() works. how would you change it ?
def create_engine(url, **kwargs):
pool = pool.Pool(**kwargs)
dialect = module.Dialect(url,
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 ODBC connector for SA would be a really nice addition.
Michael Bayer wrote:
Is it possible to specify that an ActiveMapper-derived class
should autoload its columns but to override some of those columns
(for example, to set a primary key that wasn't defined in the
database)? My attempts so haven't found any hybrid between fully
automatic and
I touched on this in an earlier thread, but think it deserves its own.
The current inheritance implementation requires a column specified for
polymorphic_on passed to a mapper and a value for that column specified
for each inheriting mapper. I don't think this approach is flexible
enough and
just FYI, the type column idea is taken from Hibernate, and that's
all Hibernate supports as far as polymorphic loading.
But for polymorphic loading in SA, you are free to make any kind of
polymorphic_union you like that can add in a functionally-generated
type column, and specify it into
Michael Bayer wrote:
just FYI, the type column idea is taken from Hibernate, and that's
all Hibernate supports as far as polymorphic loading.
I think it's good that SA takes good features from and is similar to
Hibernate, but I hope that your aspirations and those of SA's users are
to make
Hi Michael,
Thanks for your reply.
First an apology, my program is now working It was a silly mistake...
Second, I agree that what I am doing is not the most elegant thing I've ever
done...
.to put it mildly... Yet, in most cases, the fixRace function will only be
run once at startup
17 matches
Mail list logo