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" target-entity="dst.ass1.jpa.model.impl.Location" >
- <join-column name="location_id"/>
- <cascade><cascade-persist/></cascade>
- </many-to-one>
- <many-to-one name="destination" target-entity="dst.ass1.jpa.model.impl.Location">
- <join-column name="location_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">
- <join-column name="match_id"/>
- <cascade><cascade-persist/></cascade>
- </one-to-one>
- <one-to-one name="tripInfo" target-entity="dst.ass1.jpa.model.impl.TripInfo">
- <join-column name="tripinfo_id"/>
- <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