Changeset 7172
- Timestamp:
- 02/28/08 07:31:11 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/django/core/management/validation.py
r7126 r7172 233 233 if isinstance(f.rel, models.ManyToManyRel): 234 234 e.add(opts, '"unique_together" refers to %s. ManyToManyFields are not supported in unique_together.' % f.name) 235 if f not in opts.local_fields: 236 e.add(opts, '"unique_together" refers to %s. This is not in the same model as the unique_together statement.' % f.name) 235 237 236 238 return len(e.errors) django/branches/queryset-refactor/docs/model-api.txt
r7142 r7172 1166 1166 level (i.e., the appropriate ``UNIQUE`` statements are included in the 1167 1167 ``CREATE TABLE`` statement). 1168 1169 All the fields specified in ``unique_together`` must be part of the current 1170 model. If you are using `model inheritance`_, you cannot refer to fields from 1171 any parent classes in ``unique_together``. 1168 1172 1169 1173 **New in Django development version**
