-
Notifications
You must be signed in to change notification settings - Fork 26
hs360
Carlo Barazzetta edited this page Dec 4, 2018
·
6 revisions
Business objects are created just like any other object. The Create constructor of the class creates a new instance of the class. The constructor can be called with an optional Connector parameter. This connector specifies the database in which to make the object persistent.If no connector is specified, the default connector will be used. To make an object persistent, call its Store method. Only instances of classes declared with a persistence property of stored in the business model can be Stored. If an object does not already have its Id assigned, an id value will be generated and assigned to it prior to storage.
Example
var
Person: TPerson
begin
Person := TPerson.Create(MyConnector);
try
Person.Id := '12345678'
Person.Name := 'John Doe';
Person.Store;
finally
Person.Free;
end;
end;
- Home
- Glossary
- Project structure
- Installing InstantObjects
- User Guide for InstantObjects
- Creating the Business Model
- Creating the User Interface
- Programming with Persistent Objects
- Learning the Primer Demo