| Joined: Tue Aug 02, 2005 5:04 pm
 Posts: 15
 | 
				
					| When I add an object of the subclass it increments the sequence but no rows are inserted.  Generated SQL is:
 select nextval ('saccount')
 
 
 Any help is appreciated.
 
 Info:
 
 Hibernate version:
 v2 (believe 2.1.8)
 
 Mapping documents:
 <class
 name="com.x.commons.datatransfer.AccountDTO"
 table="account"
 >
 <id
 name="id"
 type="int"
 column="id">
 <generator class="native">
 <param name="sequence">saccount</param>
 </generator>
 </id>
 
 <property name="login"
 type="java.lang.String" />
 <property name="firstName" column="first_name"
 type="java.lang.String" />
 <property name="lastName" column="last_name"
 type="java.lang.String" />
 
 <joined-subclass
 name="com.x.commons.datatransfer.AccountMerchantDTO"
 table="account_merchant"
 >
 
 <key column="account_id"></key>
 
 <!-- bi-directional many-to-one association to merchant -->
 <many-to-one
 name="merchant"
 class="com.x.commons.datatransfer.MerchantDTO"
 >
 <column name="merchant_id" />
 </many-to-one>
 
 </joined-subclass>
 </class>
 
 Code between sessionFactory.openSession() and session.close():
 
 avDTO = new AccountMerchantDTO();
 avDTO.setLogin("abc");
 avDTO.setFirstName("fdfd");
 avDTO.setLastName("fdsfdssfd");
 avDTO.setMerchant(merchant); // merchant object set somewhere else
 session.save(avDTO);
 
 Full stack trace of any exception that occurs:
 
 none
 
 Name and version of the database you are using:
 
 postgres v7.4
 
 The generated SQL (show_sql=true):
 
 Hibernate: select nextval ('saccount')
 
 Debug level Hibernate log excerpt:
 
 Due to log4j problems I couldn't get this despite hours trying, but I could try more if this is necessary.
 
 
 |  |