)]}'
{"neutron/db/api.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"8472c3a4bf412fa660dfacee5b2b47897271d78a","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        # setting a simple flag on the object\u0027s state."},{"line_number":280,"context_line":"        session.enable_relationship_loading(new_object)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # look for non-uselist (normally many-to-ones) and do normal"},{"line_number":283,"context_line":"        # lazy load.  For many-to-ones where the related object is also"},{"line_number":284,"context_line":"        # in the session these lazy loads will pull from the"},{"line_number":285,"context_line":"        # identity map and not emit SELECT.  Otherwise, we are still"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffe62b97_247a8cf0","line":282,"updated":"2017-03-27 14:58:15.000000000","message":"nit: this comment is out of date, when I updated the gist.  We are loading all uselist/non-uselist relationships now.\n\n\t# look for all not-yet-loaded relationships that\n\t# would normally \"lazy load\" and load them.  In the\n\t# case of a simple many-to-one, this would pull from \n\t# the identity map without emitting SQL if the object\n\t# is present.  For collections, SQL is emitted for each.","commit_id":"05de6e033512db165f8c97d28409b935fe23bfdd"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"045ed571094ce13435e4921f46c94be714150912","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        # setting a simple flag on the object\u0027s state."},{"line_number":280,"context_line":"        session.enable_relationship_loading(new_object)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"        # look for non-uselist (normally many-to-ones) and do normal"},{"line_number":283,"context_line":"        # lazy load.  For many-to-ones where the related object is also"},{"line_number":284,"context_line":"        # in the session these lazy loads will pull from the"},{"line_number":285,"context_line":"        # identity map and not emit SELECT.  Otherwise, we are still"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffe62b97_ec3d978f","line":282,"in_reply_to":"ffe62b97_247a8cf0","updated":"2017-03-27 22:17:14.000000000","message":"Done","commit_id":"05de6e033512db165f8c97d28409b935fe23bfdd"}],"neutron/db/models_v2.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"bf7414759c83130581d8a7adb3cca4f5b4fb8d4e","unresolved":false,"context_lines":[{"line_number":259,"context_line":"def populate_relationships(session, instance):"},{"line_number":260,"context_line":"    # this ensures that the relationships are loaded on all newly"},{"line_number":261,"context_line":"    # created objects so it\u0027s safe to call make_*_dict after commit"},{"line_number":262,"context_line":"    session.refresh(instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa31d9ce_4f5a36f3","line":262,"updated":"2017-02-15 21:34:03.000000000","message":"OK this is kind of expensive.   The problem with the many-to-ones is that even if I set the relationship to None in such a way that the foreign key attribute takes precedence, you still see the None because it\u0027s not lazy loading.\n\nWhat we need is the \"init reset\" for collections, and for many-to-ones these need to do a simple GET from the session.  we\u0027ll use after_flush, let me mock it up.","commit_id":"1579fe631943613411dd42e74340b6c0084a8abe"}]}
