xp-framework/rfc — Issue #126: rdbms.Property vs. rdbms.Column
Author: thekid
Created: 2011-10-17 15:58:12+00:00
State: closed
Labels: framework, implemented

Scope of Change
====
- rdbms.Column should be used instead of rdbms.Property
- it is recommended to use Columns as arguments for Restrictions,
rdbms.Criteria::addGroupBy and rdbms.Criteria::addOrderBy

Rationale
====
- rdbms.Column has all methods, to build restrictions, like rdbms.Property.
- the difference is: The column's factory is the related Peer, a Property
does not have any knowlege of it's table

Functionality
====
In this example the Person.class is an implementation of rdbms.Dataset.
The rdbms.Dataset class itself does not have the column factory, but Peer does.
So you will give your implemented Dataset class a column method like that:

Example
----

```php
column($name);
}
}
?>
```

Property vs. Column
----
deprecated api

```php

```

new api:

```php

```

restrictions e.g.:

```php
equal(5);
?>
```

Security considerations
====
n/a

Speed impact
====
- One hand: Because of type checks, the usage of this revision may be a bit slower
- Other hnad: Because existency checks will be done when creating a Column, sql
queries will become a bit faster.

Dependencies
====
Note:

```
To use this API, the database classes have to be regenerated!

```

- new interfaces
rdbms.SQLFragment
rdbms.SQLRenderable
- deprecates rdbms.Property

Related documents
====
- Patch against skeleton/
http://xp-framework.net/rfc/contrib/rfc0126/skeleton.diff
- Patch against ports/
http://xp-framework.net/rfc/contrib/rfc0126/ports.diff