I work with Play! 1.2.4, and I ran into a curious problem.
As far as I know, if I installed jpa.ddl in my configuration to create-drop, it should delete my tables, reload and restart the application.
jpa.ddl=create-drop
Do I think that it will only fall and create tables related to the modified models? I have a problem when I have a model that has changed, but it does not drop the table. I tried to reset the table manually, but this will not allow, because it Cannot delete or update a parent row: a foreign key constraint fails
. I understand this problem and fix it, I can manually delete the entire table and restart the application so that it collects tables from scratch.
My question is, what is the problem that is playing! is there why it does not update this table, and if there is a way to get around this through the configuration files, and not manually drop my table?
Thanks.
EDIT
Just for more information, I just assume that this is a problem, and it may be something completely different, but here is what I get in my magazines:
Unsuccessful: create table Product Table 'Product' already exists
I also just understood the changes taking place at this load. I used to have such a relationship
Product *-* Image
This is the ManyToMany relationship between the Product and Image table. The table "Image" is now gone, and the relationship will disappear. However, it seems to me that the image table is not deleted, but the Product is trying to delete and rebuild. This may cause a foreign key constraint problem. Why not play this table if its model no longer exists?
source share