@@ -136,7 +136,7 @@ def _pk_columns(self) -> tuple[Any, ...]:
136136 return tuple (mapper .primary_key )
137137
138138 @property
139- def _pk_attr_names (self ) -> tuple [str , ...]:
139+ def pk_attr_names (self ) -> tuple [str , ...]:
140140 """Get primary key attribute names from the model mapper.
141141
142142 Uses mapper.get_property_by_column() to get ORM attribute names,
@@ -167,7 +167,7 @@ def get_primary_key_value(self, instance: ModelT) -> PrimaryKeyType:
167167 - For single PK: scalar value
168168 - For composite PK: tuple of values in column order
169169 """
170- return extract_pk_value_from_instance (instance , self ._pk_attr_names )
170+ return extract_pk_value_from_instance (instance , self .pk_attr_names )
171171
172172 def has_primary_key_values (self , instance : ModelT ) -> bool :
173173 """Check if all primary key values are set on an instance.
@@ -178,7 +178,7 @@ def has_primary_key_values(self, instance: ModelT) -> bool:
178178 Returns:
179179 True if all PK values are non-None, False otherwise.
180180 """
181- return pk_values_present (instance , self ._pk_attr_names )
181+ return pk_values_present (instance , self .pk_attr_names )
182182
183183 def _normalize_pk_to_tuple (self , pk_value : PrimaryKeyType ) -> tuple [Any , ...]:
184184 """Normalize a primary key value to a tuple for consistent storage key generation.
@@ -189,7 +189,7 @@ def _normalize_pk_to_tuple(self, pk_value: PrimaryKeyType) -> tuple[Any, ...]:
189189 Returns:
190190 Tuple representation of the primary key.
191191 """
192- return normalize_pk_to_tuple (pk_value , self ._pk_attr_names , self .model_type .__name__ )
192+ return normalize_pk_to_tuple (pk_value , self .pk_attr_names , self .model_type .__name__ )
193193
194194 def _get_store_key (self , pk_value : PrimaryKeyType ) -> str :
195195 """Generate a store key from a primary key value.
0 commit comments