Michael (Or anyone else),
sorry I have to get back on this. I renamed all Columns in my application
definitions to MyColumn a while back. and everything worked.
Now that I'm starting to use functionality of MyColumn. (The reason I needed
this) I run into some trouble.
What do I want:
I want
On Jan 30, 2012, at 9:49 AM, Martijn Moeling wrote:
sorry I have to get back on this. I renamed all Columns in my application
definitions to MyColumn a while back. and everything worked.
Now that I'm starting to use functionality of MyColumn. (The reason I needed
this) I run into some
Michael,
Interesting stuff, The first part I had almost covered, I did not have the
_constructor part.
It wil be part of something more complex…
Thankx,
Martijn
On Jan 30, 2012, at 17:46 , Michael Bayer wrote:
On Jan 30, 2012, at 9:49 AM, Martijn Moeling wrote:
sorry I have to get
The below example works, except if a Foreign key is given. On those columns
-e.g. orderId = MySpecialColumn(Integer, ForeignKey('Order.Id'))-
To fix this I have added stuff, see comments in code below:
As long as the Non SA Column arguments are named it is OK.
On Jan 30, 2012, at 17:46 ,
Hello.
I had a problem described in subject. Here is the testcase:
import sqlalchemy
engine = sqlalchemy.create_engine('sqlite:///:memory:')
metadata = sqlalchemy.MetaData(engine)
class ForeignKey(sqlalchemy.Column):
def __init__(self, name, foreign_column, *args, **kwargs):
fk =