Resolve Issues with Object Relational Mapping
This table describes how to address common errors you might encounter while working with ORM methods.
| Error Message | Probable Cause | Solution | 
|---|---|---|
Persisted properties must have public access or provide
                                set and get access to
                            database.relational.connection. | The Database Toolbox™ connection object needs access to the properties mapped to the database in order to read and write them properly.  | For any properties without the
                                     
 
  | 
Mappable requires at least one property to have the
                                PrimaryKey attribute. | ORM requires that you specify the primary key as the link between a MATLAB® object and its corresponding entry in a database table.  | Add a property with the   | 
Unknown AutoIncrement syntax for
                            myVendor. | Database Toolbox does not have information on how to create the autoincrementing keys for this vendor.  | Use the   | 
AutoIncrement properties cannot be written to the database
                                with specified values. Set the property to an empty or missing value
                                to allow the database to set the value
                            automatically. | The   | Set the value of the   | 
Properties with the AutoIncrement attribute must also have
                                the PrimaryKey attribute. | Database Toolbox supports the   | If you want the property with the
                                      | 
AutoIncrement properties must have integer
                                types. | A property with the   | Specify the class validation of the property as an integer type.  | 
Unknown syntax to return inserted keys for
                                Oracle. | Oracle® does not specify a syntax for retrieving the primary keys after rows have been inserted.  | Do not specify an output to   |