Advertisement
kieni17

Untitled

Mar 26th, 2020
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.25 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" target-entity="dst.ass1.jpa.model.impl.Location"  >
  37.         <join-column name="location_id"/>
  38.         <cascade><cascade-persist/></cascade>
  39.  
  40.       </many-to-one>
  41.  
  42.  
  43.       <many-to-one name="destination" target-entity="dst.ass1.jpa.model.impl.Location">
  44.         <join-column name="location_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.         <join-column name="match_id"/>
  58.         <cascade><cascade-persist/></cascade>
  59.       </one-to-one>
  60.  
  61.       <one-to-one name="tripInfo" target-entity="dst.ass1.jpa.model.impl.TripInfo">
  62.         <join-column name="tripinfo_id"/>
  63.         <cascade><cascade-persist/></cascade>
  64.       </one-to-one>
  65.  
  66.  
  67.  
  68.  
  69.       <many-to-many name="stops" target-entity="dst.ass1.jpa.model.impl.Location">
  70.         <join-table name="location_id"/>
  71.         <cascade><cascade-persist/></cascade>
  72.       </many-to-many>
  73.  
  74.  
  75.     </attributes>
  76.   </entity>
  77.  
  78. </entity-mappings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement