Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table with default foreign key naming strategy #8

Conversation

dominicbartl
Copy link

The same error still occurs. Because of the quotes around "Post_id" postgres dosn't find the column post_id

 1) bookshelf-cascade-delete with PostgreSQL client should not delete model and its dependents if an error is thrown on destroy:

      AssertionError: expected 'delete from "Category" where "Post_id" IN (select "id" from "Post" where "authorId" IN (\'3\')) - column "Post_id" does not exist' to be 'foobar'
      + expected - actual

      -delete from "Category" where "Post_id" IN (select "id" from "Post" where "authorId" IN ('3')) - column "Post_id" does not exist
      +foobar

@ricardogama
Copy link
Contributor

ricardogama commented May 18, 2016

This is not sync with the current tree of #7. Can you please rebase and only leave your commits to be merged?

@@ -333,5 +332,13 @@ describe('bookshelf-cascade-delete', () => {

sinon.restore(Model);
});

it('should foreignKey', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you trying to accomplish here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is useless. I used it to check if forgeinKey is undfined.

@ricardogama
Copy link
Contributor

@Bartinger I already spotted the bug, working on it. Thanks!

@ricardogama ricardogama force-pushed the feature/mysql-support branch 2 times, most recently from f951d54 to 69dd60e Compare May 18, 2016 23:20
@ricardogama
Copy link
Contributor

ricardogama commented May 18, 2016

@Bartinger This bug is something different than what was fixed in #7, so I'll close this PR for now and open an issue to keep track of it.

@ricardogama
Copy link
Contributor

@Bartinger Can you take a look at the comment I just made on #9? It seems that the schema you created was malformed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants