[Work in progress] Refactoring of all database stuff #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While hacking on a pdo replacement for the current implementation of our orm I got the feeling that I was reinventing the wheel :) Therefore I stopped working on building our "custom orm thing" and replaced it with propel 2.
Basically propel generates all the "basic" model code for us (stored in
app/models/Base
andapp/models/Map
). The generated code should not be stored in our repo, you have to generated it by runningvendor/bin/propel build --input-dir=config -vvv
. Propel uses aschema.xml
for defining the database schema, which is used for the code generation. With this approach I could rebuild the models with propel very easy (and in nearly no time, I just had to write a few lines in theschema.xml
).I just need to update the controllers and this should be ready.
At this point I want to get some feedback before I will continue working on this.
@deleteman: Please look over the code and let me know if you are happy with my choice or if we should rethink :)