Persisting Resources in SQL Database
You can change the default location of where your resources are persisted.
Prerequisites
- Hibernate access pointing to an SQL database
- metamodel attached to your access must have ResourceModelas a dependency
Persisting Resources in an SQL Database
- 
Create an instance of the SqlBinaryProcessor, and attach the SQL connection that points to your SQL database to theconnectionPoolproperty.You can also choose to overwrite the default tableMappingif you want to use custom table names.
- 
Create an instance of the UploadWithmetadata and attach your instance of theSqlBinaryProcessorto thepersistenceproperty. Click Apply and Commit.
- 
Create an instance of the StreamWithmetadata and attach your instance of theSqlBinaryProcessorto theretrievalproperty. Click Apply and Commit.
- 
Navigate to Custom Models and select the model bound to your Hibernate access. Go to Type Overrides and create a new GmEntityTypeOverrideinstance.
- 
Set the declaringModelproperty toResourceModel,entityTypetoResourceSource, and add yourUploadWithmetadata instance (the one where you attached theSqlBinaryProcessorto thepersistenceproperty) to themetaDatalist. Click Apply and finish, then Apply and then Commit.
- 
Still in the model bound to your Hibernate access, create a GmEntityTypeOverrideinstance.
- 
Set the declaringModelproperty toResourceModel,entityTypetoSQLSource, and add yourStreamWithmetadata instance (the one where you attached theSqlBinaryProcessorto theretrievalproperty) to themetaDatalist. Click Apply and finish, then Apply and then Commit.