As part of the JPA work, we should look at doing some redesign work on the KRAD data access layer so that it is "friendlier" to JPA.
A few things to think about for this:
- Should we renamed this to something other than BusinessObjectService? Maybe call it DataObjectService or DataAccessService?
- Would be great to allow the backend to be pluggable to some SPI, and then allow for that SPI to be pluggable on a DataObject-by-DataObject basis or on a persistence provider basis. This would allow for more easily mapping things like services and their objects up to the KRAD framework.
- Splitting out persist and update as separate operations.
- Fixing up the contract for fetching by primary key, as per discussion on the rice.collab list on 5/17/2012. Essentially, the problem is that findBySinglePrimaryKey right now takes a Map and it still does the query even if you don't pass the full primary key in the case of a "compound" primary key.
There's a lot more to it than this, but wanted to get this jira in so need to continue to fill out details and thoughts on this later.