Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Oracle DBO Updates addressing persistModel and sequencing issues #123
These updates should address the ticket I made before #1666.
The _persist() method of Object is used to resolve the issue of sequence names not being available when persistModel is true in the controller. This was particularly a problem in the method lastInsertId(), which would only be passed a string of the table name, and would therefore have no other way of knowing the sequence name, which can be modified using a table prefix or through a model property. While caching is enabled, this update will resolve that issue, and when caching is disabled, so is persistModel, so this is no longer an issue.
Sequences now correctly take table prefixes.
A 'schema' key can be defined in the database configuration to allow faster enumeration of database tables by reducing the set to the relevant tables owner.
I've also changed the Oracle unit tests to be more inline with other DBOs, while including tests for these updates and some of the existing functionality.
Let me know if you think anything could be done better here.