GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing cycle-orm.dev — Cycle ORM: Relations - Embedding Entities
Revision: Wed, 04 Nov 2026 16:26:00 GMT
Embedded EntitiesThe ORM can simplify the definition of large entities by providing the ability to split some of the columns into an embedded entity. Embedded entities by default will always be loaded with the parent object. However, partial entity selection is possible as well. You can embed one or multiple entities inside another object using the parent object table as a data source. It can be
achieved using the
#DefinitionTo define an embeddable entity use the php
To embed an entity to another object use the php
Read more about embeddings here. Embedded relations support the following options:
#Column MappingBy default, all embedded entity columns will be stored in the owning entity table without any prefix. If desired, you
can define a custom prefix using the php #UsageYou can use the relation right after a schema update (embedded columns will be added to parent entity table): php #QueryingYou can query embedded entities as your would do for any other relation: php #Eager and Lazy LoadingBy default, all embedded entities will be loaded with the parent object. To alter this behavior use the php Now, in order to preload embedded entity you have to explicitly use the php #Query Embedded entity separatelyIt is possible to query the embedded entity separately from the parent, however, you must clearly know the php
← PREVIOUS
Many To Many
NEXT →
Morphed Relations
| ||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |