Package pyperry :: Module association :: Class HasOne
[frames] | no frames]

Class HasOne

source code

 object --+        
          |        
Association --+    
              |    
            Has --+
                  |
                 HasOne

The HasOne class simply declares that the Has association is a not a collection and has a type of 'has_one'.

Instance Methods
 
type(self) source code
 
collection(self) source code

Inherited from Has: get_foreign_key, polymorphic, polymorphic_type, scope, set_foreign_key

Inherited from Association: __call__, __init__, eager_loadable, finder_options, primary_key, source_klass

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from Has: foreign_key

Inherited from object: __class__

Method Details

type(self)

source code 
Overrides: Association.type

collection(self)

source code 
Overrides: Association.collection