# Model

### New annotations&#x20;

* **@JoinEntity**  (for entity) : to explicitly define a 'join entity' (for ORM)
* **@Cascade** (for link) : for ORM cascade management (MERGE, REMOVE, etc)
* **@OrphanRemoval** (for link) : for ORM like JPA, Doctrine, etc

### Modified annotations

* **@AutoIncremented** : this annotation is now just a shortcut for 'GeneratedValue(IDENTITY)'
* **@GeneratedValue** : the parameters are different and simpler

### Model objects in template context

* $entity.hasGeneratedKey() : **new**&#x20;
* $entity.isJoinEntity() : now based on annotation @JoinEntity   <br>
* $attribute.fkPartsCount : **new**&#x20;
* $attribute.ini : **new**&#x20;
* $attribute.hasGeneratedValueStrategy(...)  : **new** &#x20;
* $attribute.hasGeneratedValueAllocationSize()  : **new**  \
  $attribute.generatedValueAllocationSize : **new** &#x20;
* $attribute.hasGeneratedValueInitialValue() : **new**  \
  $attribute.generatedValueInitialValue : **new** &#x20;
* $attribute.hasGeneratedValueSequenceName()  : **new**  $attribute.generatedValueSequenceName : **new** &#x20;
* $attribute.hasGeneratedValueTablePkValue() : **new** \
  $attribute.generatedValueTablePkValue: **new**&#x20;
* $attribute.generatedValueGenerator : removed  &#x20;
* $attribute.isSelected() : removed &#x20;
* $attribute.jdbcRecommendedJavaType : removed &#x20;
* $attribute.jdbcTypeCode : removed&#x20;
* $attribute.jdbcTypeName : removed  <br>
* $link.isOrphanRemoval() : **new**&#x20;
* $link.joinEntity : **new**  <br>
* $fk.isExplicit() : **new**,  true if 'real FK' ( with a name )
* $fk.isComposite() :  **new**,  true if more than 1 attribute<br>
* $fkPart.referencedAttribute : new &#x20;
* $fkPart.referencedEntity : new  <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://news.telosys.org/version-4.1.0/model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
