Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b7446f4c

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID b7446f4c019207a711cc89b10724f6e825cdc0b8
  • Vorgänger 1cee0f5b
  • Nachfolger f6a3fe0a

fix in em, samples updated

Unterschiede anzeigen:

src/relation.h
namespace CuteEntityManager {
enum RelationType {
ONE_TO_ONE, //e.g. specialization, heritage
ONE_TO_MANY, //@OneToMany(cascade=ALL, mappedBy="customer")
MANY_TO_ONE,
ONE_TO_MANY, //@OneToMany(cascade=ALL, mappedBy="customer") e.g. QList<QSharedPointer<Person>>
MANY_TO_ONE, //e.g. QSharedPointer<Person>
//1-n Entity foreign key in same table
MANY_TO_MANY,
MANY_TO_MANY, //e.g. QList<QSharedPointer<Person>> - realized with seperated database table
};
enum InheritanceStrategy {
......
* @param type
* @param mappedBy Q_PROPERTY in foreign Entity
*/
explicit Relation(QString propertyName, RelationType type, QString mappedBy,
explicit Relation(QString propertyName, RelationType type, QString mappedBy = QString(),
QList<CascadeType> cascadeType = {MERGE, PERSIST, REFRESH});
~Relation();
RelationType getType() const;

Auch abrufbar als: Unified diff