I am trying to develop a JavaFX Desktop application with Hibernate. In my data-model I have two entities (Player, Team). Every Player belongs to one Team.
Player
id : int firstName : String lastName : String ref_Team : int
Team
id : int Name : String
In my application I have currently two tables for each Entity and everything works well. But now I want to got a step further and in the TableView for Team-Entity I intend to add a column "Players Count".
I know how to bind a TableColumn, e.g. firstNameCol.setCellValueFactory((data) -> data.getValue().firstNameProperty());
But in my Team-Entity there is no property for counting the Players. Any ideas how to bind the numberOfPlayerCol?