Module settings in PersistentRecord defaults not saving

I created a settings page with default values but instead of it saving these values it saves what seem to be cached values from prior module settings.

You’ll need to share a little more information or code.

Where is this record being created? Edited? Saved?

I have a GatewayHook class which extends the AbstractGatewayModuleHook which calls the updatePersistentRecords for each record type (I have a few) in its setup. Additionally in the setup I add listeners for update, add, and deleted.

Try dropping the table from SQLite manually, then launching your module.

SQLite/our ORM doesn’t handled changing default values well; if you ever set a default in a PersistentRecord on a live system, that default is (basically) encoded forevermore.

Could you tell me how I might drop a table from SQLite? I only have the Sample_SQLite_Database in my gateway but I can’t find a table that seems to correspond with my records. I can provide images of the code if that will help.

[EDIT] I figured it out and dropped the table. The defaults now work.

For posterity, since I wasn’t clear in my first post (my bad!): You’d drop the table your module added from the config.idb file in the data directory of wherever you installed Ignition, using any external tool that communicates with SQLite dbs.