40 likes | 126 Vues
Explore advanced XMLColumn mapping in JPA, integrate JAXB dependencies for XML Schema to JAXB XML bindings. Learn how to navigate single value paths, use required annotations, and perform CRUD queries with examples. Discover namespace declarations, scalar functions, and more for optimized data handling.
E N D
JPA XMLColumn mapping • JAXB dependency • XML Schema xsd to JAXB XML bindings • @XmlRootElement • Required Annotations • @Persistent • @Strategy("org.apache.openjpa.jdbc.meta.strats.XMLValueHandler") • CRUD
Query • Simple comparisons • Navigate single value path • Examples: • "Select o from ProductOrders o where o.podetails.customer.name = ?1" • Select o from ProductOrders o where o.podetails.customer.type = ?1
Sample query test can be found under openjpa openjpa-persistence-jdbc/src/test/ java/org/apache/openjpa/persistence/xmlmapping.query/ TestXMLCustomerOrder.java Generated SQL for differenct platforms: TestXMLCustomerOrder.db2 TestXMLCustomerOrder.oracle TestXMLCustomerOrder.sqlserver
Future Functionality • Namespace declarations • Other predicates • Scalar functions • Multi-valued