Package orm2 :: Module relationships :: Class many2one
[hide private]
[frames] | no frames]

Class many2one

source code

    object --+            
             |            
      property --+        
                 |        
datatypes.datatype --+    
                     |    
          relationship --+
                         |
                        many2one

Instance Methods [hide private]
  __init__(self, child_class, child_key=None, foreign_key=None, column=None, title=None, has_default=None, cache=True)
  __set_from_result__(self, ds, dbobj, value)
  __init_dbclass__(self, dbclass, attribute_name)
This methods gets called by dbobject's metaclass.
  __get__(self, dbobj, owner)
See the Python Language Reference, chapter 3.3.2.2 for details on how this works.
  __set__(self, dbobj, value)
Set the child object to `value'.
  isset(self, dbobj)
  __convert__(self, value)
Relationships do not need a convert method or can't use it anyway.
  sql_literal(self, dbobj)
This relationship cannot be represented as an SQL literal.
  __select_this_column__(self)

Inherited from relationship: __select_after_insert__

Inherited from datatypes.datatype: __delete__, __setattr__, add_widget, check_dbobj, data_attribute_name, widget_specs

Inherited from property: __getattribute__, __new__

Inherited from object: __delattr__, __hash__, __reduce__, __reduce_ex__, __repr__, __str__


Class Variables [hide private]

Inherited from datatypes.datatype: python_class, sql_literal_class

Inherited from property: fdel, fget, fset


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, child_class, child_key=None, foreign_key=None, column=None, title=None, has_default=None, cache=True)
(Constructor)

source code 
Parameters:
  • cache - Indicates whether the relationship object shall keep a copy of the child object in the dbobj for faster access.
Overrides: relationship.__init__

__set_from_result__(self, ds, dbobj, value)

source code 
None
Overrides: relationship.__set_from_result__

__init_dbclass__(self, dbclass, attribute_name)

source code 
This methods gets called by dbobject's metaclass. It supplies the db property with info about the class it belongs to and its attribute name.
Overrides: datatypes.datatype.__init_dbclass__
(inherited documentation)

__get__(self, dbobj, owner)

source code 
See the Python Language Reference, chapter 3.3.2.2 for details on how this works. Be sure to be in a relaxed, ready-for-hard-figuring mood.
Overrides: datatypes.datatype.__get__
(inherited documentation)

__set__(self, dbobj, value)

source code 
Set the child object to `value'. If the child object has not been inserted, yet it will be by this function.
Overrides: datatypes.datatype.__set__

isset(self, dbobj)

source code 
Returns:
True. Most relationships are always set, even if they return [] or the like.
Overrides: relationship.isset
(inherited documentation)

__convert__(self, value)

source code 
Relationships do not need a convert method or can't use it anyway.
Overrides: relationship.__convert__
(inherited documentation)

sql_literal(self, dbobj)

source code 
This relationship cannot be represented as an SQL literal.
Overrides: relationship.sql_literal
(inherited documentation)

__select_this_column__(self)

source code 
Returns:
False. Most relationships do not need to select anything.
Overrides: relationship.__select_this_column__
(inherited documentation)