ceyesuma -4 Posting Pro
SELECT b.book_num,b.book_start_date,b.book_start_time,book_end_time,b.stu_num,i.instr_lname FROM instructor AS i,booking AS b
WHERE i.instr_num=i.instr_num AND i.instr_num=b.instr_num;

Can someone help me get these xmls to produce this SQL(HQL)?

This is how I represented the Instructor.class
Instructor.hbm.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
  <class dynamic-insert="false" dynamic-update="false" mutable="true" name="lesson.Instructor" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="instructor">
    <id column="instr_num" name="instrNum">
      <generator class="increment"/>
    </id>
    <property column="instr_lname" name="instrLName"/>
    <set cascade="all-delete-orphan" inverse="true" lazy="true" name="booking" table="booking"/>
      <key column="instr_num"/>
      <one-to-many class="lesson.Booking"/>
    </set>
  </class>
</hibernate-mapping>

I would like to join with the booking table to extract the following properties
Booking.java
Booking.hbm.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
  <class dynamic-insert="false" dynamic-update="false" mutable="true" name="lesson.Booking" optimistic-lock="version" polymorphism="implicit" select-before-update="false" table="booking">
      <id column="book_num" name="bookNum">
          <generator class="increment"/>
      </id>
      <property column="book_start_date" name="bookStartDate"/>
      <property column="book_start_time" name="bookStartTime"/>
      <property column="book_end_time" name="bookEndTime"/>
      <property column="stu_num" name="stuNum"/>
  </class>

</hibernate-mapping>

SELECT b.book_num,b.book_start_date,b.book_start_time,book_end_time,b.stu_num,i.instr_lname FROM instructor AS i,booking AS b
WHERE i.instr_num=i.instr_num AND i.instr_num=b.instr_num;

Can someone help me get those xmls to produce this SQL(HQL)?