Advertisement
kieni17

Untitled

Mar 27th, 2020
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.20 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
  3.                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
  5.                 version="2.0">
  6.  
  7.   <package>dst.ass1.jpa.model.impl</package>
  8.   <entity class="dst.ass1.jpa.model.impl.Trip" name="Trip">
  9.     <table name="Trip"/>
  10.  
  11.     <entity-listeners>
  12.       <entity-listener class="dst.ass1.jpa.listener.TripListener"></entity-listener>
  13.     </entity-listeners>
  14.  
  15.     <attributes>
  16.       <id name="id">
  17.         <column name="trip_id"/>
  18.         <generated-value/>
  19.       </id>
  20.  
  21.       <basic name="created">
  22.         <column name="created"/>
  23.         <temporal>DATE</temporal>
  24.       </basic>
  25.  
  26.       <basic name="updated">
  27.         <column name="updated"/>
  28.         <temporal>DATE</temporal>
  29.       </basic>
  30.  
  31.       <basic name="state">
  32.         <column name="state"/>
  33.       </basic>
  34.  
  35.  
  36.       <many-to-one name="pickup" optional="false" target-entity="dst.ass1.jpa.model.impl.Location"  >
  37.         <join-column name="pickup_id"/>
  38.         <cascade><cascade-persist/></cascade>
  39.  
  40.       </many-to-one>
  41.  
  42.  
  43.       <many-to-one name="destination" optional="false" target-entity="dst.ass1.jpa.model.impl.Location">
  44.         <join-column name="destination_id"/>
  45.         <cascade><cascade-persist/></cascade>
  46.       </many-to-one>
  47.  
  48.  
  49.       <many-to-one name="rider" target-entity="dst.ass1.jpa.model.impl.Rider">
  50.         <join-table name="rider_id"/>
  51.         <cascade><cascade-persist/></cascade>
  52.       </many-to-one>
  53.  
  54.  
  55.  
  56.       <one-to-one name="match" target-entity="dst.ass1.jpa.model.impl.Match">
  57.         <cascade><cascade-persist/></cascade>
  58.       </one-to-one>
  59.  
  60.       <one-to-one name="tripInfo" target-entity="dst.ass1.jpa.model.impl.TripInfo">
  61.         <cascade><cascade-persist/></cascade>
  62.       </one-to-one>
  63.  
  64.  
  65.       <many-to-many name="stops" target-entity="dst.ass1.jpa.model.impl.Location">
  66.         <join-table name="location_id"/>
  67.         <cascade><cascade-persist/></cascade>
  68.       </many-to-many>
  69.  
  70.  
  71.     </attributes>
  72.   </entity>
  73.  
  74. </entity-mappings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement