Bug 742461 - SQL backend doesn't update customer info

Two problems: The GncCustomer wasn't marked dirty and the GncAddress's
parent wasn't being set when the loaded from SQL.
This commit is contained in:
John Ralls 2016-08-22 15:06:02 -07:00
parent 4d8d7ed546
commit 59c5f8e0fc
2 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,7 @@ load_address( const GncSqlBackend* be, GncSqlRow* row,
g_return_if_fail( pObject != NULL );
g_return_if_fail( table_row != NULL );
addr = gncAddressCreate( be->book, NULL );
addr = gncAddressCreate( be->book, QOF_INSTANCE(pObject));
for ( subtable = col_table; subtable->col_name != NULL; subtable++ )
{
buf = g_strdup_printf( "%s_%s", table_row->col_name, subtable->col_name );

View File

@ -65,6 +65,8 @@ void mark_address (GncAddress *address)
{
address->dirty = TRUE;
if (address->parent)
qof_instance_set_dirty(address->parent);
qof_event_gen (QOF_INSTANCE(address), QOF_EVENT_MODIFY, address->parent);
qof_event_gen (address->parent, QOF_EVENT_MODIFY, NULL);
}