Skip to content

Commit

Permalink
Adding default lazy on dataobject_property.Property
Browse files Browse the repository at this point in the history
  • Loading branch information
mwatts15 committed Sep 15, 2020
1 parent 3e06681 commit fb9f257
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions owmeta_core/dataobject_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,25 @@ class Property(with_metaclass(ContextMappedPropertyClass, DataUser, Contextualiz
'''
A property attached to a `~owmeta_core.dataobject.DataObject`.
'''

multiple = False
'''
If `True`, then the property will only maintain a single staged value at a time. No
effort is made to check how many values are stored in the RDF graph.
'''

class_context = RDF_CONTEXT
link = R.RDF.Property
linkName = "property"
cascade_retract = False
base_namespace = R.Namespace("http://openworm.org/entities/")

lazy = True
'''
If `True`, then the property is not attached to an instance until the property is set
or queried.
'''

def __init__(self, owner, **kwargs):
super(Property, self).__init__(**kwargs)
self._v = []
Expand Down

0 comments on commit fb9f257

Please sign in to comment.