Answered on SO: http://stackoverflow.com/a/17845372/440323


On Wednesday, July 24, 2013 5:03:19 PM UTC-4, msa...@gmail.com wrote:
>
> I am trying to use the method posted by 
> http://stackoverflow.com/questions/8054665/multi-column-unique-constraint-with-web2py
>
>     db.define_table('ts_customer',
>                 Field('customer_name', 'string', length=80, required=True, 
> unique=True))
>
>     db.define_table('ts_mileage_rate',
>                 Field('customer_id', 'reference ts_customer', 
> required=True, notnull=True),
>                 Field('mileage_rate_year', 'integer', required=True, 
> notnull=True,
>                       requires=IS_NOT_IN_DB(
>                           db(db.ts_mileage_rate.customer_id == 
> request.vars.customer_id),
>                           'ts_mileage_rate.mileage_rate_year')
>                 ))
>
> I get the following error:
>
> type 'exceptions.AttributeError'> 'DAL' object has no attribute 
> 'ts_mileage_rate'
>
> Any idea why? 
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to