Open samakovuluk opened 5 years ago
At the moment transient fields are not supported. Many reason for this is the question how to fill them during GET request: The JPA Processor converts OData GET requests into JPA Tuple Queries to have a nice way to handle $select and to convert the result. A consequence of this is that a hook would be needed for transient fields, which is called after the query has finished. Can you provide an example how you would like to fill the transient field?
This is an example of how I tried to use @Transient
@Column(name = "description")
private String text;
//getter setter
@Column
@Transient
private List<String> words;
public List<String> getWords() {
return Arrays.asList(text.split(" ,"));
}
public void setWord(List<String> words) {
this.words = words;
}
In general this is a doable thing, but more complicated as it looks at the first glance.
@Collection
annotation, which is used as trigger up to nowI have to it on the requirements list
Any luck with actually achieving it?
Do have you have some improvements with that issue?
Just created my first JPA entity together with Olingo + JPA Processor. I want to use an entity property with the @Transient annotation so the database is not populated with that value. Unfortunately, that property is not visible in the $metadata of the service. Is there any way to create a visible property that is transient for JPA?