Schema Modeler Documentation

I am launching the Data Abstract Schema Modeler from Relativity Server. Is there any documentation that explains the data flags for the table columns?

Hello,
here’s description of the Schema Field members, it will be added to the Schema Modeler documentation (http://wiki.remobjects.com/wiki/Schema_Modeler_for_Windows)

Name
Represents the field name - the name of the field the client receives. It does not have to match the real tables field names.

Description
Represents an optional description for the field.

In Primary Key
If set, this field is part of the primary key.

Log Changes
If set, this field is included in the deltas, if not, all changes to this field are ignored.

ServerCalculated
If set, this field is calculated by the server (either in SQL or code).

ServerAutoRefresh
If set, the server will automatically refresh the value of this field after insert/update, useful when using server logic to modify the data and later sending it back to the client.

Required
If set, this field cannot be null.

Read-Only
If set, this field cannot be changed.

Calculated
If set, this field is (client side) calculated. Generally, the ‘expression’ property is set then, containing how this field will be calculated.

Data Type
Type of the field.

Size
Represents the optional size for string fields.

Scale\Precision
Available only for Decumal. Scale is the number of digits to the right of the decimal point in a number. Precision is the number of digits in a number.

Default Value
Represents the string representation of the default value of this field.

Blob Type
Represents the blob type to use for the field.

Expression
When using client-side calculated fields this will contain the expression that will evaluate the real value.

Generator Name
Represents the name of the generator for this field. Generators are used in Firebird, PostGreSQL and Interbase for auto incremental primary keys.

EditMask
Edit mask for this field. This is only used from Data Abstract for Delphi and contains the edit mask string to use in edit boxes.

EditFormat
Edit format for this field. This is only used from Data Abstract for Delphi and contains the format string for any text field.

DisplayLabel
Display label for this field, this is the name shown to users of the client application.

DisplayFormat
Display format for this field (only used by Data Abstract for Delphi clients).

Align
Alignment of this field (Left, Right, Center), used for displaying purposes.

Visibile
If set, this field is visible, in clients, this bit can be used to determine if it’s a field that should be shown to the user of the client application or not.

DisplayWidth
Display width for this field, in number of characters.

CustomAttributes
Associated custom attributes, this can contain any string and can be interpreted by accessing this property.

Hello,

Does that mean that ServerAutoRefresh tells RS to refresh the column and send it to the client?

My question originated from the fact that Schema Modeler imports a SQL Server IDENTITY column as Log Changes, Required, AutoInc. I would think Log Changes = false, Server Autorefresh = true, Required = false, Read-Only = true. Does AutoInc cause RS to handle the column correctly or should these checkboxes be changed?

Thanks,

David

Hi David,

Does that mean that ServerAutoRefresh tells RS to refresh the column and send it to the client?

Yeah, something like it. But it uses for cases other than auto-increments handling.
For example - you have some business logic implemented at your database-tier (e.g DB server) which modifies values in the changed row, say set time-stamp of processing, or calculate some values. Your client should be aware of that changes. Thus such fields should be marked as ServerAutoRefresh. After applying update, DataAbstract will compose select statement which get values for the ServerAutoRefresh fields and updates result delta values. Then updated delta will be sent to the client for synchronization.

My question originated from the fact that Schema Modeler imports a SQL Server IDENTITY column as Log Changes, Required, AutoInc. I would think Log Changes = false, Server Autorefresh = true, Required = false, Read-Only = true. Does AutoInc cause RS to handle the column correctly or should these checkboxes be changed?

yeah and from first look this seems has a sence. But DataAbstract can work with a lot of different databases, some of them uses auto-increments like MSSQL and MySQL, some of them uses generators like Oracle or Firebird. Thus in order to be abstract from database differences, autoincrement fields processes in its own special way here. Lets review it in general:

For example, you have master-detail relation between two tables and need to have an ability at the client side insert master record and several details records. Later, when you will have conection to the server, you can apply these changes. In situation when server defines autoincrement ID by himself, you need to preserve the relation between master and detail rows. You need to update details rows with new master ID generated by the server.

Data Abstract handles this by adding temporary negative values for auto-increment fields (at the client side). This is one of the reason why such field is not Read-Only, Required and LogChanges is True. (Finally, nobody can forbid you to modify the keys for a specific record). During update at the DataAbstract server, where master record goes first, DA will take new ID generated by the database and will substitute all entries of old negative keys with newly generated keys. Thus all details records will be applied with proper new identifiers.

Hope it helps.