I have been working with Lucee (coldfusion) for some time now and I can't resolve a certain issue we're having. We use the ORM framework with entities to work with data. It's all working nicely except one thing:
We have an external API that doesn't use the ORM framework. I use mysql queries to insert a row in a table. Works all fine and dandy, but if I go to our ORM application and try to save a second row then I get a "Duplicate Entry for key PRIMARY" error.
So it's clear to me the ORM framework isn't up to date with the externally added row. How do I tell ORM to reload this data? ORMReload() is very slow so I don't want to use that (and that's for the whole structure). EntityReload isn't working either.
A simple example on how I use the ORM framework:
var simple_item = entityNew("item");
entitySave(simple_item);
ormFlush();
So anyone got an idea how I can fix this? Thanks in advance!
P.S. Currently I set the primary key with a function inside the entity instead of using generator="increment" to make it work, but that's just a workaround.