Changeset 83 for elixir/trunk/elixir/entity.py
- Timestamp:
- 03/05/07 21:32:53 (6 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/entity.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/entity.py
r82 r83 25 25 DEFAULT_AUTO_PRIMARYKEY_NAME = "id" 26 26 DEFAULT_AUTO_PRIMARYKEY_TYPE = Integer 27 27 DEFAULT_VERSION_ID_COL = "row_version" 28 28 29 29 class EntityDescriptor(object): … … 70 70 71 71 for option in ('inheritance', 72 'autoload', 'shortnames', 'auto_primarykey'): 72 'autoload', 'shortnames', 'auto_primarykey', 73 'version_id_col'): 73 74 setattr(self, option, options_defaults[option]) 74 75 … … 141 142 kwargs['order_by'] = self.translate_order_by(self.order_by) 142 143 144 if self.version_id_col: 145 kwargs['version_id_col'] = self.fields[self.version_id_col].column 146 143 147 if self.parent: 144 148 if self.inheritance == 'single': … … 192 196 # for field in self.fields.itervalues(): 193 197 # self.add_field(field) 198 199 if self.version_id_col: 200 if not isinstance(self.version_id_col, basestring): 201 self.version_id_col = DEFAULT_VERSION_ID_COL 202 self.add_field(Field(Integer, colname=self.version_id_col)) 194 203 195 204 if not self.autoload:
