Skip to content

Instantly share code, notes, and snippets.

@jeppenejsum
Created August 11, 2011 06:46
Show Gist options
  • Save jeppenejsum/1139035 to your computer and use it in GitHub Desktop.
Save jeppenejsum/1139035 to your computer and use it in GitHub Desktop.
Rails FK hack in JRuby
module ::ArJdbc
module PostgreSQL
module Column
print "In module"
def disable_referential_integrity(&block)
print "disable jdbc"
transaction {
begin
execute "SET CONSTRAINTS ALL DEFERRED"
yield
ensure
execute "SET CONSTRAINTS ALL IMMEDIATE"
end
}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment