Configuring SQL Components with no Database Access

SQL introspected components have an extra predefined bool field named accessDatabase. You can visualize it by expanding the Fuego.Sql.SqlObject entry in the structure panel of the SQL component.

The accessDatabase default value is set to true. If the value is set to false, the object is considered as a simple object structure. In this case, any setting value or getting value actions performed on the object do not have effect on the database, but on the object structure.

The code shown below does not interact with the database:
	c = CUSTOMER()
	
	c.accessDatabase = false 
	// or c = CUSTOMER(accessDatabase: false)
	
	c.custtype = "GLOBAL"
	
	......
	

load

When the primary key of an SQL component is filled and another attribute that is not primary key is accessed, an automatic load is performed internally. If you want to disable it from working like that, set the accessDatabase attribute to false.

store

If the accessDatabase field is set to true, when the sql is serialized as a process instance, only the primary key is stored, but, all the sql component fields are store if the accessDatabase is set to false''.

Note: When the object is serialized as a ProcessInstance variable having the accessDatabase field set to false not only the primary is store but also all the object fields are. See more information in SQL Components as instance variables.

accessDatabase Attribute and Methods Behavior

The SQL methods load, store and remove, force access to the database, by setting the default value to the accessDatabase field, that is true.