[sqlalchemy] Secialists question: how to do implement stock-management

2010-10-29 Thread Dan @ Austria
Hi, i have a question to database/design specialist. How can (should!) i implement a stock management system in sql-alchemy and python? I get the following data from another system via files - movements: bills from a scanner at a cash deck - movements: from goods-receipt Of course i have also

Re: [sqlalchemy] Secialists question: how to do implement stock-management

2010-10-29 Thread Mark Erbaugh
On Oct 29, 2010, at 6:12 AM, Dan @ Austria wrote: Hi, i have a question to database/design specialist. How can (should!) i implement a stock management system in sql-alchemy and python? I get the following data from another system via files - movements: bills from a scanner at a cash

Re: [sqlalchemy] Create_all() - Create_JustThese(engine, [Table1,Table2,....])?

2010-10-29 Thread Martijn Moeling
Simon (and the others), thank you! the someClass.__table__works... Kind regards, Martijn On Oct 27, 2010, at 5:02 PM, King Simon-NFHD78 wrote: -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Martijn Moeling Sent: 27

Re: [sqlalchemy] Working with mapper objects without saving them

2010-10-29 Thread Martijn Moeling
I did this in one of my previous projects. what I did was to make a python module, with the right SQLAlchemy includes and all the mapper objects. what I did not do is connecting to the database (it makes the class module database independent) What it does is it implements the iCal standard, it

[sqlalchemy] Relationship between a class with two different instances of other class (Newbie)

2010-10-29 Thread Hector Blanco
Hello list... I wrote a couple of days ago about how to model an structure of three classes (http://groups.google.com/group/sqlalchemy/browse_thread/thread/5ba5c4ad16f789d6#). I thing I almost have it, but I am still getting problems mapping an structure like this. class Child(rdb.Model):

[sqlalchemy] LONGVARCHAR

2010-10-29 Thread sandro dentella
Hi, firefox uses sqlite to store bookmark info. The file is called places.sqlite and the schema has type LONGVARCHAR for some fields and LONG for another. Autoloading that with sqlalchemy maps that columns to NullType rather that to a String / Integer one. Same for LONG type I don't really know

Re: [sqlalchemy] Relationship between a class with two different instances of other class (Newbie)

2010-10-29 Thread Conor
On 10/29/2010 09:43 AM, Hector Blanco wrote: Hello list... I wrote a couple of days ago about how to model an structure of three classes (http://groups.google.com/group/sqlalchemy/browse_thread/thread/5ba5c4ad16f789d6#). I thing I almost have it, but I am still getting problems mapping an

Re: [sqlalchemy] LONGVARCHAR

2010-10-29 Thread Michael Schlenker
Am 29.10.2010 17:08, schrieb sandro dentella: Hi, firefox uses sqlite to store bookmark info. The file is called places.sqlite and the schema has type LONGVARCHAR for some fields and LONG for another. Autoloading that with sqlalchemy maps that columns to NullType rather that to a String /

[sqlalchemy] SQLite / Decimal

2010-10-29 Thread Mark Erbaugh
How do people handle Decimal data with SA / SQLite? Newer versions of SA give the following warning: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider

Re: [sqlalchemy] Relationship between a class with two different instances of other class (Newbie)

2010-10-29 Thread Hector Blanco
Thanks Conor! The callable works like a charm! It's great news! (I've been trying to figure out this for 3 days... yeah... I guess I'm not that smart) Now that I have it working, a “design” question pops up. Nothing technical, really. As Connor mentioned in his reply: “Usually we consider the

[sqlalchemy] Many to One vs session

2010-10-29 Thread Mark Erbaugh
I have a table (T) that has a many-to-one relationship (via foreign key inclusion) to a category table (C). Let's name the relationship category. When I retrieve an existing T record, SA populates the category field with an instance of C. I can change the category to a different value by

Re: [sqlalchemy] SQLite / Decimal

2010-10-29 Thread Michael Bayer
On Oct 29, 2010, at 12:37 PM, Mark Erbaugh wrote: How do people handle Decimal data with SA / SQLite? Newer versions of SA give the following warning: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point -

[sqlalchemy] Simple relationship 1:1 fails with Foreign key assocated with column ------- could not find table

2010-10-29 Thread Hector Blanco
Hello, group! I am still dealing with the relationship I asked before (http://groups.google.com/group/sqlalchemy/browse_thread/thread/c1d46daf35116999). To tell the truth, I'm not even sure if this is a question I should ask in the SqlAlchemy forum because I'm also dealing with Megrok.rdb

Re: [sqlalchemy] Simple relationship 1:1 fails with Foreign key assocated with column ------- could not find table

2010-10-29 Thread Conor
On 10/29/2010 05:31 PM, Hector Blanco wrote: Hello, group! I am still dealing with the relationship I asked before (http://groups.google.com/group/sqlalchemy/browse_thread/thread/c1d46daf35116999). To tell the truth, I'm not even sure if this is a question I should ask in the SqlAlchemy

[sqlalchemy] Secialists question: how to do implement stock-management

2010-10-29 Thread Warwick Prince
Hi Dan This is a little off topic for this group, however, I consider myself a specialist in the area you question, so I'm delighted to be on the helping end for a change :-) We can continue this one-on-one outside the group. Send your questions to me. I prefer Skype for this type of thing

Re: [sqlalchemy] SQLite / Decimal

2010-10-29 Thread Mark Erbaugh
On Oct 29, 2010, at 6:18 PM, Michael Bayer wrote: How do people handle Decimal data with SA / SQLite? Newer versions of SA give the following warning: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point -

Re: [sqlalchemy] Relationship between a class with two different instances of other class (Newbie)

2010-10-29 Thread Conor
On 10/29/2010 11:51 AM, Hector Blanco wrote: Thanks Conor! The callable works like a charm! It's great news! (I've been trying to figure out this for 3 days... yeah... I guess I'm not that smart) Now that I have it working, a “design” question pops up. Nothing technical, really. As Connor

Re: [sqlalchemy] Many to One vs session

2010-10-29 Thread Conor
On 10/29/2010 01:23 PM, Mark Erbaugh wrote: I have a table (T) that has a many-to-one relationship (via foreign key inclusion) to a category table (C). Let's name the relationship category. When I retrieve an existing T record, SA populates the category field with an instance of C. I can

Re: [sqlalchemy] Many to One vs session

2010-10-29 Thread Mark Erbaugh
On Oct 29, 2010, at 9:39 PM, Conor wrote: I have a table (T) that has a many-to-one relationship (via foreign key inclusion) to a category table (C). Let's name the relationship category. When I retrieve an existing T record, SA populates the category field with an instance of C. I can

[sqlalchemy] Re: Best way to get data from database

2010-10-29 Thread Eric Ongerth
I understand your question if you are getting different data from the server in the two database accesses. But if you are loading the exact same data twice for a page load, you should try to eliminate that redundancy instead of finding a plan to perform the redundancy in the best way. If it's