Quando si crea un progetto JPA (consultare "Creazione di un nuovo progetto JPA), Š possibile creare anche il file orm.xml
che definisce le impostazioni predefinite ed i metadati dell'associazione.
Eclipse crea il file META-INF\orm.xml
nella directory del progetto:
<?xml version="1.0" encoding="UTF-8"?> <persistence version="<PERSISTENCE_VERSION>" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="<PERSISTENCE_UNIT_NAME>"> <provider="<PERSISTENCE_PROVIDER>" /> </persistence-unit> </persistence>