Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
- version="2.0">
- <package>dst.ass1.jpa.model.impl</package>
- <entity class="dst.ass1.jpa.model.impl.Trip" name="Trip">
- <table name="Trip"/>
- <entity-listeners>
- <entity-listener class="dst.ass1.jpa.listener.TripListener"></entity-listener>
- </entity-listeners>
- <attributes>
- <id name="id">
- <column name="trip_id"/>
- <generated-value/>
- </id>
- <basic name="created">
- <column name="created"/>
- <temporal>DATE</temporal>
- </basic>
- <basic name="updated">
- <column name="updated"/>
- <temporal>DATE</temporal>
- </basic>
- <basic name="state">
- <column name="state"/>
- </basic>
- <many-to-one name="pickup" optional="false" target-entity="dst.ass1.jpa.model.impl.Location" >
- <join-column name="pickup_id"/>
- <cascade><cascade-persist/></cascade>
- </many-to-one>
- <many-to-one name="destination" optional="false" target-entity="dst.ass1.jpa.model.impl.Location">
- <join-column name="destination_id"/>
- <cascade><cascade-persist/></cascade>
- </many-to-one>
- <many-to-one name="rider" target-entity="dst.ass1.jpa.model.impl.Rider">
- <join-table name="rider_id"/>
- <cascade><cascade-persist/></cascade>
- </many-to-one>
- <one-to-one name="match" target-entity="dst.ass1.jpa.model.impl.Match">
- <cascade><cascade-persist/></cascade>
- </one-to-one>
- <one-to-one name="tripInfo" target-entity="dst.ass1.jpa.model.impl.TripInfo">
- <cascade><cascade-persist/></cascade>
- </one-to-one>
- <many-to-many name="stops" target-entity="dst.ass1.jpa.model.impl.Location">
- <join-table name="location_id"/>
- <cascade><cascade-persist/></cascade>
- </many-to-many>
- </attributes>
- </entity>
- </entity-mappings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement