|
|
|
## Modèle Référentiel
|
|
|
|
## `Referential` model
|
|
|
|
|
|
|
|
Pas de has_many mais des méthodes??
|
|
|
|
Methods instead of `has_many` associations??
|
|
|
|
|
|
|
|
## Modèle lié à un Réferentiel
|
|
|
|
## Model associated with a `Referential`
|
|
|
|
|
|
|
|
### Support du Référentiel
|
|
|
|
### `Referential` support
|
|
|
|
|
|
|
|
Les classes ayant une relation avec un Référentiel doivent :
|
|
|
|
Classes with an association to `Referential` must:
|
|
|
|
|
|
|
|
* inclure le module ReferentialSupport
|
|
|
|
* ne pas avoir de "belongs_to referential" car un Référentiel = un schéma PostgreSQL
|
|
|
|
* include the `ReferentialSupport` module
|
|
|
|
* not have a `belongs_to :referential` association because each `Referential` is a separate Postgres schema
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
```
|
|
|
|
|
|
|
|
### Gestion des objectid
|
|
|
|
### Objectids
|
|
|
|
|
|
|
|
Les objectids ne sont pris en compte que dans les modèles contenus dans un Référentiel.
|
|
|
|
Vous trouverez ci-dessous un exemple d'utilisation.
|
|
|
|
Objectids are only used on models contained in a `Referential`. Here's an example:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
```
|
|
|
|
|
|
|
|
## Modèle en dehors d'un Réferentiel
|
|
|
|
## Model not associated with a `Referential`
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
```
|
| ... | ... | |