get_jpa_model
Scan Java classes for JPA annotations (@Entity, @Table, @Id, relationships) and assemble the entity model with table names, ID fields, and relationship details.
Instructions
Assemble the project's JPA entity model.
USAGE: get_jpa_model() OUTPUT: Entities with table name, id field, and relationships (kind, target entity, mappedBy side), with locations.
Scans @Entity types (jakarta.persistence and javax.persistence) and reads @Table, @Id, and @OneToMany/@ManyToOne/@OneToOne/ @ManyToMany field annotations. Relationship targets are resolved from the field's type binding, including through collection type arguments (List -> Order).
Projects without JPA on the classpath return an empty model.
Options:
maxResults: cap the reported entities (default 100)
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxResults | No | Maximum entities to return (default 100) |