This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line! See this thread for details.
James, it's definitely not a Maven issue... But it might be related to different versions of TopLink... I seem to remember there used to be a bug with TopLink not allowing automatic FK generation, and he's pretty adamant that nothing has changed apparently...
Even so, Amr, first thing I would try is check if you have cascade=PERSIST or ALL set on your relationship. If not, set it. In this case, it cannot have worked before. If it is there, persist the Merchant, flush the EntityManager, and then persist the Store. That ought to work. Your merchant will be in the database, and your FK constraint will not fail. If this fixes it, it might be due to TopLink. If it still doesn't work, you'll definitely have a different error message.
And please, next time post all the relevant code and configs, not just the error message.