Verified against Semitexa Ultimate 2026.09.19.1020

Orm attributes

Every attribute declared by Orm, with the signature the code has and a usage quoted from the codebase.

#[Aggregate]

Semitexa\Orm\Attribute\Aggregate

Applies to: property

parameter type required
function string yes
field string yes
foreignKey string no

No usage found in this installation.

#[AsMapper]

Semitexa\Orm\Attribute\AsMapper

Applies to: class

parameter type required
resourceModel string yes
domainModel string yes
#[AsMapper(
    resourceModel: DemoAiTaskResource::class,
    domainModel: DemoAiTask::class
)]
final class DemoAiTaskMapper implements ResourceModelMapperInterface

— vendor/semitexa/demo/src/Application/Db/MySQL/Mapper/DemoAiTaskMapper.php

#[AsRepository]

Semitexa\Orm\Attribute\AsRepository

Applies to: class

Takes no arguments.

#[AsRepository]
final class ProductAdminRepository

— vendor/semitexa/demo/resources/examples/Orm/QueryBuilder/ProductAdminRepository.example.php

#[BelongsTo]

Semitexa\Orm\Attribute\BelongsTo

Applies to: property

parameter type required
target string yes
foreignKey string yes
onDelete Semitexa\Orm\Domain\Enum\ForeignKeyAction no
onUpdate Semitexa\Orm\Domain\Enum\ForeignKeyAction no
writePolicy Semitexa\Orm\Domain\Enum\RelationWritePolicy no
    #[BelongsTo(target: CategoryResource::class, foreignKey: 'category_id')]
    public ?CategoryResource $category = null;

— vendor/semitexa/demo/resources/examples/Data/Relations/ProductResource.example.php

#[Broadcast]

Semitexa\Orm\Attribute\Broadcast

Applies to: property

Takes no arguments.

No usage found in this installation.

#[Column]

Semitexa\Orm\Attribute\Column

Applies to: property

parameter type required
type Semitexa\Orm\Adapter\DatabaseType yes
length int no
precision int no
scale int no
default mixed no
nullable bool no
name string no
    #[Column(type: 'uuid')]
    public string $id;

— vendor/semitexa/demo/resources/examples/Data/Catalog/CategoryResource.example.php

#[Connection]

Semitexa\Orm\Attribute\Connection

Applies to: class

parameter type required
name string no
#[Connection('default')]
#[Index(columns: ['aggregate_type', 'aggregate_id'], unique: true, name: 'uniq_aggregate_ownership')]
#[Index(columns: ['owner_node_id'], unique: false, name: 'idx_aggregate_ownership_owner')]
final readonly class AggregateOwnershipResourceModel

— vendor/semitexa/ledger/src/Application/Db/MySQL/Model/AggregateOwnershipResourceModel.php

#[Deprecated]

Semitexa\Orm\Attribute\Deprecated

Applies to: property

Takes no arguments.

No usage found in this installation.

#[Filterable]

Semitexa\Orm\Attribute\Filterable

Applies to: property

parameter type required
name string no
        #[Filterable]
        #[Column(type: MySqlType::Varchar, length: 32)]
        public string $status,

— vendor/semitexa/demo/src/Application/Db/MySQL/Model/DemoAiTaskResource.php

#[FromTable]

Semitexa\Orm\Attribute\FromTable

Applies to: class

parameter type required
name string yes
#[FromTable(name: 'categories')]
final class CategoryResource

— vendor/semitexa/demo/resources/examples/Data/Catalog/CategoryResource.example.php

#[HasMany]

Semitexa\Orm\Attribute\HasMany

Applies to: property

parameter type required
target string yes
foreignKey string yes
onDelete Semitexa\Orm\Domain\Enum\ForeignKeyAction no
onUpdate Semitexa\Orm\Domain\Enum\ForeignKeyAction no
writePolicy Semitexa\Orm\Domain\Enum\RelationWritePolicy no
    #[HasMany(target: ProductResource::class, foreignKey: 'category_id')]
    public array $products = [];

— vendor/semitexa/demo/resources/examples/Data/Relations/CategoryResource.example.php

#[Index]

Semitexa\Orm\Attribute\Index

Applies to: class. Repeatable.

parameter type required
columns array|string yes
unique bool no
name string no
#[Index(columns: ['tenant_id', 'status'], name: 'idx_demo_ai_tasks_tenant_status')]
final readonly class DemoAiTaskResource

— vendor/semitexa/demo/src/Application/Db/MySQL/Model/DemoAiTaskResource.php

#[ManyToMany]

Semitexa\Orm\Attribute\ManyToMany

Applies to: property

parameter type required
target string yes
pivotTable string yes
foreignKey string yes
relatedKey string yes
onDelete Semitexa\Orm\Domain\Enum\ForeignKeyAction no
onUpdate Semitexa\Orm\Domain\Enum\ForeignKeyAction no
writePolicy Semitexa\Orm\Domain\Enum\RelationWritePolicy no
        #[ManyToMany(
            target: ValidTagResourceModel::class,
            pivotTable: 'product_tags',
            foreignKey: 'productId',
            relatedKey: 'tagId',
            writePolicy: RelationWritePolicy::SyncPivotOnly,
        )]
        public array $tags = [],

— vendor/semitexa/orm/tests/Fixture/Metadata/ValidTaggedProductResourceModel.php

#[OneToOne]

Semitexa\Orm\Attribute\OneToOne

Applies to: property

parameter type required
target string yes
foreignKey string yes
onDelete Semitexa\Orm\Domain\Enum\ForeignKeyAction no
onUpdate Semitexa\Orm\Domain\Enum\ForeignKeyAction no
writePolicy Semitexa\Orm\Domain\Enum\RelationWritePolicy no
        #[OneToOne(target: TenantRelationRecord::class, foreignKey: 'orderId', writePolicy: RelationWritePolicy::ReferenceOnly)]
        public ?RelationState $profile = null,

— vendor/semitexa/orm/tests/Unit/Hydration/TenantScopedRelationLoadingTest.php

#[PrimaryKey]

Semitexa\Orm\Attribute\PrimaryKey

Applies to: property

parameter type required
strategy string no
    #[PrimaryKey(strategy: 'uuid')]
    #[Column(type: MySqlType::Binary, length: 16)]
    public string $id;

— vendor/semitexa/demo/resources/examples/Orm/NPlusOne/ProductCardResource.example.php

#[ResourceKey]

Semitexa\Orm\Attribute\ResourceKey

Applies to: class

parameter type required
key string yes
#[ResourceKey('custom_key')]
final readonly class KeyedResourceModel

— vendor/semitexa/orm/tests/Fixture/Metadata/KeyedResourceModel.php

#[SelfManagedTable]

Semitexa\Orm\Attribute\SelfManagedTable

Applies to: class. Repeatable.

parameter type required
table string yes
#[SelfManagedTable(self::TABLE)]
final class JournalRepository

— vendor/semitexa/update/src/Application/Service/JournalRepository.php

#[SoftDelete]

Semitexa\Orm\Attribute\SoftDelete

Applies to: class

parameter type required
column string yes
#[SoftDelete(column: 'deletedAt')]
final readonly class HydratableProductResourceModel

— vendor/semitexa/orm/tests/Fixture/Hydration/HydratableProductResourceModel.php

#[TenantExempt]

Semitexa\Orm\Attribute\TenantExempt

Applies to: class

parameter type required
reason string yes
#[TenantExempt(reason: 'platform-ui demo submissions — no tenant dimension by design; never carries real tenant rows')]
final readonly class UiFormDemoSubmissionResource

— vendor/semitexa/platform-ui/src/Application/Db/MySQL/Model/UiFormDemoSubmissionResource.php

#[TenantScoped]

Semitexa\Orm\Attribute\TenantScoped

Applies to: class

parameter type required
strategy string no
column string no
#[TenantScoped(strategy: 'same_storage')]
final class CatalogProductResource

— vendor/semitexa/demo/resources/examples/Orm/SharedTable/CatalogProductResource.example.php

#[Version]

Semitexa\Orm\Attribute\Version

Applies to: property

Takes no arguments.

        #[Version]
        #[Column(type: MySqlType::Int)]
        public int $version,

— vendor/semitexa/orm/tests/Unit/Persistence/OptimisticLockingTest.php