Lightweight 0.20260625.0
Loading...
Searching...
No Matches
Lightweight::Through< JoinRecordT > Struct Template Reference

Marks the join record of a relationship that is reached through an intermediate table. More...

#include <Record.hpp>

Public Types

using RecordType = JoinRecordT
 The join record type this marker wraps.
 

Detailed Description

template<typename JoinRecordT>
struct Lightweight::Through< JoinRecordT >

Marks the join record of a relationship that is reached through an intermediate table.

Writing the join record bare - HasManyThrough<Person, Friendship> - leaves the reader to remember which of the two record types is the join table. Wrapping it says so at the call site:

struct Person
{
};
This API represents a many-to-many relationship between two records through a third record.
Represents a single column in a table.
Definition Field.hpp:84

The bare spelling still compiles, but is deprecated and will be removed in a future release.

Template Parameters
JoinRecordTThe join record type, holding the foreign keys of the relationship.
See also
HasManyThrough, HasOneThrough

Definition at line 157 of file Record.hpp.

Member Typedef Documentation

◆ RecordType

template<typename JoinRecordT >
using Lightweight::Through< JoinRecordT >::RecordType = JoinRecordT

The join record type this marker wraps.

Definition at line 160 of file Record.hpp.


The documentation for this struct was generated from the following file: