Fixtures.deleteAll() doesn't work with PostgreSQL or Oracle

Bug #507172 reported by thelinuxlich
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Medium
Nicolas Leroux
1.1
Fix Committed
Medium
Nicolas Leroux

Bug Description

These two RDBMS doesn't have an easy way to disable referential integrity check like mySQL, so Play will always complain about foreign key constraints.

Revision history for this message
thelinuxlich (thelinuxlich) wrote :
Revision history for this message
thelinuxlich (thelinuxlich) wrote :

A new fix to handle schema owner with oracle driver

Revision history for this message
Guillaume Bort (guillaume-bort) wrote :

I don't understand how your fix work. Can you make it simpler? Without using a shared state ...

Revision history for this message
thelinuxlich (thelinuxlich) wrote :

It's difficult to abstract more because these two RDBMS doesn't have an easy way to disable referential integrity check without looking into the schema metadata, dropping and creating constraints on the fly.

Revision history for this message
nicolas@martignole.net (nicolas-martignole) wrote :

Confirmed with Play 1.0.3 and Oracle

In getForeignKeyToggleStmt we need to execute 2 statements:
- one statement to prepare a list of ALTER TABLE
- one statement with all the ALTER TABLE operation

Problem is that getForeignKeyToggleStmt is not designed to execute 2 statements,
so we will have to dig a little bit more

I'll try to propose a fix too asap

Nicolas

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.