QOF: qofreference.h File Reference

QOF 0.7.5

Data Structures
qofreference.h File Reference
Query Object Framework » Reference: Referring to entities outside a partial book.

Dealing with relationships between entities in partial books. More...

`#include "qof.h"`

Go to the source code of this file.

## Data Structures
struct | qof_entity_reference
| External references in a partial QofBook. More...

## Using a partial QofBook.
Part of the handling for partial books requires a storage mechanism for references to entities that are not within reach of the partial book. This requires a GList in the book data to contain the reference QofIdType and GUID so that when the book is written out, the reference can be included. See qof_book_get_data. When the file is imported back in, the list needs to be rebuilt. The QSF backend rebuilds the references by linking to real entities. Other backends can process the list in similar ways. The list stores the QofEntityReference to the referenced entity - a struct that contains the GUID and the QofIdType of the referenced entity as well as the parameter used to obtain the reference. Partial books need to be differentiated in the backend, the flag in the book data is used by qof_session_save to prevent a partial book being saved using a backend that requires a full book. Forcing this flag would cause data loss so always merge a partial book with the complete book (even if that book is initially empty) before trying to save the data using a backend that does not support partial books.
#define | ENTITYREFERENCE "QofEntityReference"
#define | PARTIAL_QOFBOOK "PartialQofBook"
| Flag indicating a partial QofBook. More...
typedef struct qof_entity_reference | QofEntityReference
| External references in a partial QofBook. More...
void | qof_session_update_reference_list (QofSession *session, QofEntityReference *reference)
| Adds a new reference to the partial book data hash. More...
void | qof_book_set_references (QofBook *book)
| Read QofEntityReference data for this book and set values. More...
QofEntityReference * | qof_entity_get_reference_from (QofEntity *ent, const QofParam *param)
| Get a reference from this entity to another entity. More...

## Detailed Description

Dealing with relationships between entities in partial books.

Author
  Copyright (c) 2006 Neil Williams linux.nosp@m.@cod.nosp@m.ehelp.nosp@m..co..nosp@m.uk

Definition in file qofreference.h.