PHPackages                             openbuildings/jam-materialized-path - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. openbuildings/jam-materialized-path

AbandonedArchivedKohana-module[Database &amp; ORM](/categories/database)

openbuildings/jam-materialized-path
===================================

Materialized path nesting for Jam ORM models

0.1.0(11y ago)04BSD-3-ClausePHPPHP &gt;=5.4.0

Since Nov 3Pushed 11y ago12 watchersCompare

[ Source](https://github.com/OpenBuildings/jam-materialized-path)[ Packagist](https://packagist.org/packages/openbuildings/jam-materialized-path)[ RSS](/packages/openbuildings-jam-materialized-path/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Jam Materialized Path
=====================

[](#jam-materialized-path)

[![Build Status](https://camo.githubusercontent.com/15dd74a06d1ff549f638fbd58d0a01ebedd18c8104050eba4cd19c0fe369c524/68747470733a2f2f7472617669732d63692e6f72672f4f70656e4275696c64696e67732f6a616d2d6d6174657269616c697a65642d706174682e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/OpenBuildings/jam-materialized-path)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/736d62ba42d092dcc5157e0be294e99ef91d7276d211c4238792e26efa5524c5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f6a616d2d6d6174657269616c697a65642d706174682f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/OpenBuildings/jam-materialized-path/)[![Code Coverage](https://camo.githubusercontent.com/b5373ec3c5f7b9933df783618e75e28960a585c2ff2c2dd1daaa02061708e72c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f70656e4275696c64696e67732f6a616d2d6d6174657269616c697a65642d706174682f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/OpenBuildings/jam-materialized-path/)[![Latest Stable Version](https://camo.githubusercontent.com/7923009c91d7ef77d2f981385d001ed4fe5b50cfff276a752a453f20dc9e5fd7/68747470733a2f2f706f7365722e707567782e6f72672f4f70656e4275696c64696e67732f6a616d2d6d6174657269616c697a65642d706174682f762f737461626c652e706e67)](https://packagist.org/packages/OpenBuildings/jam-materialized-path)

Materialized path nesting for Jam ORM models

Usage
-----

[](#usage)

Add this behaviors your Model

```
class Model_Category extends Jam_Model {

    public static function initialize(Jam_Meta $meta)
    {
        $meta
            ->behaviors(array(
                'materializedpath' => Jam::behavior('materializedpath')
            ));
    }
}
```

**Database Table:**

```
┌─────────────────────────┐
│ Table: Category         │
├─────────────┬───────────┤
│ id          │ ingeter   │
│ name        │ string    │
│ parent_id*  │ integer   │
│ path*       │ string    │
└─────────────┴───────────┘
* Required fields

```

Methods
-------

[](#methods)

It will add "parent" and "children" associations to the repo. The model will get the convenience methods:

MethodDescription**decendents**()Get a query builder collection for all the decendents**ansestors**()Get a query builder collection for all the ansestors**is\_root**()Boolean check if it is root (has parent) or not**is\_descendent\_of**(Jam\_Model $parent)Chech if a model is descendant**is\_ansestor\_of**(Jam\_Model $child)Chech if model is ansestor**depth**()The depth of the item in the hierarchyLicense
-------

[](#license)

Copyright (c) 2014, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4210d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/506129?v=4)[Harry Dobrev](/maintainers/hkdobrev)[@hkdobrev](https://github.com/hkdobrev)

![](https://avatars.githubusercontent.com/u/4113307?v=4)[Danail Kyosev](/maintainers/dkyosev)[@dkyosev](https://github.com/dkyosev)

![](https://avatars.githubusercontent.com/u/7592650?v=4)[Evstati Zarkov](/maintainers/EZarkov)[@EZarkov](https://github.com/EZarkov)

![](https://avatars.githubusercontent.com/u/745771?v=4)[Filip Georgiev](/maintainers/phgeorgiev)[@phgeorgiev](https://github.com/phgeorgiev)

![](https://avatars.githubusercontent.com/u/490439?v=4)[Zdravko Evstatiev](/maintainers/zedevs)[@zedevs](https://github.com/zedevs)

---

Top Contributors

[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (8 commits)")

### Embed Badge

![Health badge](/badges/openbuildings-jam-materialized-path/health.svg)

```
[![Health](https://phpackages.com/badges/openbuildings-jam-materialized-path/health.svg)](https://phpackages.com/packages/openbuildings-jam-materialized-path)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
