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 - Truebool - Falsedicttype[Resource]KVStore | NoneReturns the resource created from the data and resource_typing_name if new_instance, it forces to rebuild the resource
bool - FalseResourcetype[Resource] | NoneTechnicalInfoDictFSNodeFSNodeboolboolboolReturns True if the model is saved in db, False otherwise
boolModelTypeRemove 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
ModelTypestrResourceModelstrResourceModelDTOResourceSimpleDTOAnyCreate 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
strAnyAnystrResourceModel | NonestrboolCreate 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.GENERATEDScenario | NoneTaskModel | Nonestr | Nonebool | NoneResourceModelReturns 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]Expression | NoneDatabaseProxyReturns the (current) DbManager of this model
AbstractDbManagerModelMetadataAnyAnystrboolModelSelectReturns the table name of this class
str | NoneAnyReturns True if the index exists in the table
strboolGet all the classes that inherit this class
listAnyAnyAnyAnyAnyAnyReturns True if the class has a table name defined
boolAnyAnyAnyAnyAnyAnyCreate the ResourceModel from the Resource and save it
ResourceResourceOrigin - ResourceOrigin.GENERATEDScenario | NoneTaskModel | Nonestr | Nonebool | NoneResourceModelPerforms 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