Discussion:
[Modeling-users] problem with the simplest of the model
Lorenzo Gil Sanchez
2004-09-28 08:38:17 UTC
Permalink
Hello,

I'm upgrade Modeling with the latest cvs and now, for a very simple
model, the script mdl_generate_DB_schema.py gives me errors:

-----------------

mdl_generate_DB_schema.py -v -C --admin-dsn localhost:pets.sqlite:kk:zz
model_pets2.py
Loading the model...
Error: model has errors:

Aborting

------------------

As you can see I can't know what is wrong with my model, which I'll
paste right here:


from Modeling.PyModel import *

Entity.defaults['properties'] = [
APrimaryKey('id', isClassProperty=0, isRequired=1, doc='PK')
]

model = Model('Pets', adaptorName='SQLite',
connDict={'database': 'pets.sqlite'}, version='0.1')

model.entities = [
Entity('Person',
properties = [AString('name', isRequired=1)]
),
Entity('Animal',
properties = [AString('name', isRequired=1)]
)
]

model.build()
--
Lorenzo Gil Sanchez <***@sicem.biz>
Lorenzo Gil Sanchez
2004-09-29 08:23:47 UTC
Permalink
I wrote a patch yesterday to fix this problem so I'll attach it here for
further review

Lorenzo
Post by Lorenzo Gil Sanchez
Hello,
I'm upgrade Modeling with the latest cvs and now, for a very simple
-----------------
mdl_generate_DB_schema.py -v -C --admin-dsn localhost:pets.sqlite:kk:zz
model_pets2.py
Loading the model...
Aborting
------------------
As you can see I can't know what is wrong with my model, which I'll
from Modeling.PyModel import *
Entity.defaults['properties'] = [
APrimaryKey('id', isClassProperty=0, isRequired=1, doc='PK')
]
model = Model('Pets', adaptorName='SQLite',
connDict={'database': 'pets.sqlite'}, version='0.1')
model.entities = [
Entity('Person',
properties = [AString('name', isRequired=1)]
),
Entity('Animal',
properties = [AString('name', isRequired=1)]
)
]
model.build()
--
Lorenzo Gil Sanchez <***@sicem.biz>
Sebastien Bigaret
2004-09-30 16:39:02 UTC
Permalink
Hi Lorenzo,

Sorry for the late answer, and thanks a lot for reporting and for the
patch. It will be integrated as is into the main CVS trunk and in the
next release. Thanks again!

-- Sébastien.
Post by Lorenzo Gil Sanchez
I wrote a patch yesterday to fix this problem so I'll attach it here for
further review
Lorenzo
Loading...