Here is a simple question:
Our server side code uses the following Entity Objects to encapsulate a set of data
That should be sufficient detail to understand where the data model is headed.
Your documentation clearly states that we should prefer SQL over JPA DataSources. It also states that DataSources can return beans.
I have tried at great length to create a pojo that models the server side implementation, and to get an SQLDataSource to effectively return that bean as a DSResponse. Declaring that bean to be a schemaBean however blows up as there is no column in the table with the name cdl, sortie, etc. Declaring that bean using beanClassName results in a successful fetch however the data returned is flat much like the resulting table from using Embeddables. So I thought perhaps I could use valueXPath to define the mapping of fields to bean setters and getters, but then it complains that the returned object has no such objects and methods.
So I am wondering, am I missing something in configuration, or are my expectations not in alignment with what an SQLDataSource can really do? I have poured over the documentation and samples and do not see anything that either confirms or denies this is capable, neither any example that illustrates such an idea. Am I actually expected to use a JPA2DataSource in this implementation? If you would like I can provide all entity and embeddables, along with ds.xml and bean classes. But for expediency at the end of the day, and an expectation that you are going to tell me that this is not possible I will forgo providing them at this moment.
Thanks for you explanation in advance :)
Our server side code uses the following Entity Objects to encapsulate a set of data
That should be sufficient detail to understand where the data model is headed.
Your documentation clearly states that we should prefer SQL over JPA DataSources. It also states that DataSources can return beans.
I have tried at great length to create a pojo that models the server side implementation, and to get an SQLDataSource to effectively return that bean as a DSResponse. Declaring that bean to be a schemaBean however blows up as there is no column in the table with the name cdl, sortie, etc. Declaring that bean using beanClassName results in a successful fetch however the data returned is flat much like the resulting table from using Embeddables. So I thought perhaps I could use valueXPath to define the mapping of fields to bean setters and getters, but then it complains that the returned object has no such objects and methods.
So I am wondering, am I missing something in configuration, or are my expectations not in alignment with what an SQLDataSource can really do? I have poured over the documentation and samples and do not see anything that either confirms or denies this is capable, neither any example that illustrates such an idea. Am I actually expected to use a JPA2DataSource in this implementation? If you would like I can provide all entity and embeddables, along with ds.xml and bean classes. But for expediency at the end of the day, and an expectation that you are going to tell me that this is not possible I will forgo providing them at this moment.
Thanks for you explanation in advance :)
Comment