ResourceModel
ResourceModel class.
data: Dict[str, Any]flagged: boolfolder: SpaceFolderfs_node_model: FSNodeModelgenerated_by_port_name: strid: strname: strorigin: ResourceOriginparent_resource_id: strscenario: Scenariostyle: TypingStyletask_model: TaskModelInitialize self. See help(type(self)) for accurate signature.
bool - Truebool - FalsedictType[Resource]Optional[KVStore]Returns the resource created from the data and resource_typing_name if new_instance, it forces to rebuild the resource
bool - FalseResourceOptional[Type[Resource]]TechnicalInfoDictFSNodeFSNodeboolReturns True if the model is saved in db, False otherwise
boolfor each BaseRField of the resource, store its value to the data or kvstore
ResourceModelTypeRemove the kv store if it exists
Sets the data
set force_insert to True to force creation of the object
set skip_hook to True to skip the before insert or update hook
ModelTypestr'ResourceModel'strResourceModelDTOResourceSimpleDTOAnyCreate the foreign keys because it was deffered
Method call after the table is created
Usefull to create the full text indexes
AnyAnybool - Truebool - TrueAnyAnybool - Truebool - TrueAnyAnyAnyAnyAnyReturns the name of the class
bool - Falsebool - Falsebool - FalsestrClear folders from all the entities that have the folder
ListReturns True if the column exists in the table
strboolAnyCreate a foreign key for a Foreign key field only if the foreign key does not exists
ForeignKeyFieldMethod to create a full text index
ListstrCreate model table
AnystrModelDeleteList[ResourceModel]strDrop model table
Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name
strAnyAnystrOptional['ResourceModel']strboolCreate a new ResourceModel from a resource
Don't set the resource here so it is regenerate on next get ( avoid using same instance)
ResourceResourceOrigin - ResourceOrigin.GENERATEDOptional[Scenario]Optional[TaskModel]strboolResourceModelReturns the full name of the class
bool - Falsebool - FalsestrAnyAnystrOptionalGet by ID and throw 404 error if object not found
strModelTypeListListstrModelSelectList[str]ModelSelectstrModelSelectList[str]ModelSelectList[str]ModelSelectReturn the expression to search resource base on a type and all its subtypes.
If the Resource type is provided, it returns None
List[str]ExpressionDatabaseProxyReturns the (current) DbManager of this model
TypeAnyAnystrboolModelSelectReturns the table name of this class
strAnyReturns True if the index exists in the table
strboolGet all the classes that inherit this class
ListAnyAnyAnyAnyAnyAnyAnyAnyAnyAnyAnyAnyCreate the ResourceModel from the Resource and save it
ResourceResourceOrigin - ResourceOrigin.GENERATEDScenarioTaskModelstrboolResourceModelPerforms full-text search on the field. Must be overrided by child class to work
strstrModelSelectAnystrModelSelectselect resource by type of any subclass of this type
Type[Resource]ModelSelectAnyAnyAnyAnyAnyAny