Summary
With all of the XML mapping information under your belt, you should now be able to map entities using annotations, XML, or a combination of the two. In this chapter we went over all of the elements in the mapping file and compared them to their corresponding annotations. We discussed how each of the elements is used, what they override, and how they are overridden. We also used them in some short examples.
Defaults may be specified in the mapping files at different levels, from the global persistence unit level to the mapping file level. We covered what each of the defaulting scopes was and how they were applied.
In the next chapter we will look at how to package and deploy applications that use the Java Persistence API. We will also look at how XML mapping files are referenced as part of a persistence unit configuration.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Mike Keith and Merrick Schincariol
About this chapter
Cite this chapter
(2006). XML Mapping Files. In: Pro EJB 3. Apress. https://doi.org/10.1007/978-1-4302-0168-7_10
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0168-7_10
Publisher Name: Apress
Print ISBN: 978-1-59059-645-6
Online ISBN: 978-1-4302-0168-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)