What is you print print str(schedulings) instead? Any change?

On Wednesday, 16 January 2013 07:48:18 UTC-6, raphael...@netaxis.be wrote:
>
> Hello,
>
> I have a table defined like this in my model:
> db.define_table('schedulings',
>   Field('name'),
>   Field('description'),
>   Field('connectorId', db.connectors),
>   Field('scenarioId', db.scenarios),
>   Field('parametersSetId', db.parametersSets),
>   Field('minInterval', 'integer', default=10),
>   Field('maxDuration', 'integer', default=0),
>   Field('scenarioInstanceId', default=''),
>   Field('nextRun', 'double'),
> )
>
> db.schedulings.name.requires = [IS_NOT_IN_DB(db, 'schedulings.name'), 
> IS_NOT_EMPTY()]
> db.schedulings.connectorId.requires = IS_IN_DB(db, db.connectors.id)
> db.schedulings.scenarioId.requires = IS_IN_DB(db, db.scenarios.id)
> db.schedulings.parametersSetId.requires = IS_IN_DB(db, 
> db.parametersSets.id)
> db.schedulings.minInterval.requires = IS_INT_IN_RANGE(0, 86401)
> db.schedulings.maxDuration.requires = IS_INT_IN_RANGE(0, 86400*7+1)
>
> When I use appadmin, I can verify that all the fields are populated:
> schedulings.id schedulings.name schedulings.description 
> schedulings.connectorId schedulings.scenarioId schedulings.parametersSetId 
> schedulings.minInterval schedulings.maxDuration 
> schedulings.scenarioInstanceId schedulings.nextRun
> 1 test 1 1 8 10 0 None
>
> But when I do a simple select with all fields, I don't get all the fields. 
> This code (launched as an homemade task queue):
> schedulings = db().select(db.schedulings.ALL)
> print schedulings.as_list()
> outputs:
> [{'minInterval': 10, 'description': '', 'scenarioId': 1, 'connectorId': 1, 
> 'id': 1, 'maxDuration': 0, 'name': 'test'}]
>
> For instance, parametersSetId, set to 8 is not present in the row 
> retrieved.
>
> Any idea why?
>
> Thanks in advance.
>
> Best Regards,
> Raphael
>

-- 



Reply via email to