I have a Java program that can manage and create some Person objects. When I start my application and I want to add a person with the same national number as a person already in the database, my program has to block the creation.
So far so good. Now... I have a person in my database with the same national number as a person I want to add. However when I change the value of the national number in the database explorer when the program is running and I want to recreate the person, he keeps saying the duplicate national number. How can I fix it so that when my program is going to create a new Person object, he first refreshes his internal "cache" or internal "objects"?