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

Fixed ActiveRecordObject->save() returning wrong results, Fixed concrete inheritence save-loop-bug #634

Closed
wants to merge 7 commits into from

Conversation

tals56
Copy link

@tals56 tals56 commented May 12, 2014

I have added code to ObjectBuilder.php which fixes returning wrong results when performing updates,
and now throwing an exception when trying to update non-existant objects.

Also, 2 bugs in concrete inheritence were fixed:
1.getSyncParent() - now the inherited object stores its parent, and returns the same one when the parent object has been created \ retrieved.

2.Loop-saving when saving parent - a quite massive bug causing 2 parent objects to be saved, due to loop-saving in inherited objects, and extra non-required SQL statements to be performed.

@tals56 tals56 changed the title fixedActiveRecordObject->save() returns wrong results , concrete inheritence save-loop-bug fixed Fixed ActiveRecordObject->save() returning wrong results, Fixed concrete inheritence save-loop-bug May 12, 2014
@tals56
Copy link
Author

tals56 commented May 12, 2014

Hello,
I'm quite new to GitHub ( and new to Git actually )
so please check whether I made any mistakes when committing code.

Thank you.

Added the full-namespace and class name to the code.
@tals56
Copy link
Author

tals56 commented May 17, 2014

If someone may try to help:
I don't understand why the tests fail when looking for \Propel\Tests\Bookstore\Behavior\ConcreteArticle.

Thank you.

@mpscholten
Copy link
Member

The ConcreteArticle class will be created in the constructor of the test. So you cannot extend the ConcreteArticle class before the Test has started.

You would need to wait until the setUp method was called, to create your helper class. Try to move the helper class into another file and then include the file after the QuickBuilder::buildSchema($schema); is called.

Maybe it's also possible to replace your helper class with php unit mocks. This should also solve the failing test.

@marcj
Copy link
Member

marcj commented Jul 15, 2014

Feel free to ask us more question to understand the test suite better and get it green.

@dereuromark
Copy link
Contributor

Almost 6 years stale, closing then.

@dereuromark dereuromark closed this Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants