-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: When object is saved to db, associated object is not saved
PostPosted: Thu Feb 16, 2006 7:26 am 
Newbie

Joined: Thu Feb 16, 2006 6:43 am
Posts: 5
Location: Bangalore, India
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
Hibernate Version 3.1


Mapping documents:

Person.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="com.infra.persistence.bean.Person"
table="person"
>

<id
name="personId"
type="long"
column="person_id"
>
<generator class="assigned" />
</id>

<property
name="age"
type="int"
column="age"
length="4"
/>
<property
name="firstname"
type="java.lang.String"
column="firstname"
length="255"
/>
<property
name="lastname"
type="java.lang.String"
column="lastname"
length="255"
/>

<!-- associations -->
<!-- bi-directional one-to-many association to PersonEvent -->
<set
name="personEvents"
lazy="true"
inverse="true"
>
<key>
<column name="person_id" />
</key>
<one-to-many
class="com.infra.persistence.bean.PersonEvent"
/>
</set>
<!-- bi-directional one-to-many association to PersonEmailAddr -->
<set
name="personEmailAddrs"
lazy="true"
inverse="true"
>
<key>
<column name="person_id" />
</key>
<one-to-many
class="com.infra.persistence.bean.PersonEmailAddr"
/>
</set>

</class>
</hibernate-mapping>


PersonEmailAddr.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Created by Middlegen Hibernate plugin

http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->

<class
name="com.infra.persistence.bean.PersonEmailAddr"
table="person_email_addr"
>

<composite-id>
<key-property
name="emailAddr"
column="email_addr"
type="java.lang.String"
length="255"
/>
</composite-id>


<!-- associations -->
<!-- bi-directional many-to-one association to Person -->
<many-to-one
name="person"
class="com.infra.persistence.bean.Person"
not-null="true"
>
<column name="person_id" />
</many-to-one>

</class>
</hibernate-mapping>



Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
Person person = new Person();
person.setAge(22);
person.setFirstname("XYZ");
person.setLastname("ABC");
person.setPersonId(new Long(103));
Set set1 = new HashSet();
PersonEmailAddr email = new PersonEmailAddr();
email.setEmailAddr("Kyahuva@aztec.com");
email.setPerson(person);
set1.add(email);
person.setPersonEmailAddrs(set1);
session.save(person);
session.getTransaction().commit();


Full stack trace of any exception that occurs:

Name and version of the database you are using:
Postgres 8.0.3


The generated SQL (show_sql=true):
insert into person (age, firstname, lastname, person_id) values (?, ?, ?, ?)


Debug level Hibernate log excerpt:
2006-02-16 16:23:50,254 (org.hibernate.cfg.Environment) - Hibernate 3.1
2006-02-16 16:23:50,269 (org.hibernate.cfg.Environment) - hibernate.properties not found
2006-02-16 16:23:50,269 (org.hibernate.cfg.Environment) - using CGLIB reflection optimizer
2006-02-16 16:23:50,269 (org.hibernate.cfg.Environment) - using JDK 1.4 java.sql.Timestamp handling
2006-02-16 16:23:50,379 (org.hibernate.cfg.Configuration) - configuring from resource: /hibernate.cfg.xml
2006-02-16 16:23:50,379 (org.hibernate.cfg.Configuration) - Configuration resource: /hibernate.cfg.xml
2006-02-16 16:23:50,426 (org.hibernate.util.DTDEntityResolver) - trying to locate http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
2006-02-16 16:23:50,426 (org.hibernate.util.DTDEntityResolver) - found http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - connection.pool_size=1
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - dialect=org.hibernate.dialect.PostgreSQLDialect
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - current_session_context_class=thread
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - cache.provider_class=org.hibernate.cache.NoCacheProvider
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - show_sql=true
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - hbm2ddl.auto=update
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - connection.url=jdbc:postgresql://localhost:5432/Globe
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - connection.driver_class=org.postgresql.Driver
2006-02-16 16:23:50,472 (org.hibernate.cfg.Configuration) - hibernate.connection.username=postgres
2006-02-16 16:23:50,504 (org.hibernate.cfg.Configuration) - hibernate.connection.password=rajmohan
2006-02-16 16:23:50,504 (org.hibernate.cfg.Configuration) - null<-org.dom4j.tree.DefaultAttribute@1995d80 [Attribute: name resource value "hibernate-config/com/infra/persistence/bean/Person.hbm.xml"]
2006-02-16 16:23:50,504 (org.hibernate.cfg.Configuration) - Reading mappings from resource: hibernate-config/com/infra/persistence/bean/Person.hbm.xml
2006-02-16 16:23:50,504 (org.hibernate.util.DTDEntityResolver) - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
2006-02-16 16:23:50,519 (org.hibernate.util.DTDEntityResolver) - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
2006-02-16 16:23:50,660 (org.hibernate.cfg.HbmBinder) - Mapping class: com.infra.persistence.bean.Person -> person
2006-02-16 16:23:50,675 (org.hibernate.cfg.HbmBinder) - Mapped property: personId -> person_id
2006-02-16 16:23:50,675 (org.hibernate.cfg.HbmBinder) - Mapped property: age -> age
2006-02-16 16:23:50,675 (org.hibernate.cfg.HbmBinder) - Mapped property: firstname -> firstname
2006-02-16 16:23:50,675 (org.hibernate.cfg.HbmBinder) - Mapped property: lastname -> lastname
2006-02-16 16:23:50,691 (org.hibernate.cfg.HbmBinder) - Mapped property: personEvents
2006-02-16 16:23:50,691 (org.hibernate.cfg.HbmBinder) - Mapped property: personEmailAddrs
2006-02-16 16:23:50,691 (org.hibernate.cfg.Configuration) - null<-org.dom4j.tree.DefaultAttribute@1c9a690 [Attribute: name resource value "hibernate-config/com/infra/persistence/bean/Event.hbm.xml"]
2006-02-16 16:23:50,691 (org.hibernate.cfg.Configuration) - Reading mappings from resource: hibernate-config/com/infra/persistence/bean/Event.hbm.xml
2006-02-16 16:23:50,691 (org.hibernate.util.DTDEntityResolver) - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
2006-02-16 16:23:50,691 (org.hibernate.util.DTDEntityResolver) - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
2006-02-16 16:23:50,722 (org.hibernate.cfg.HbmBinder) - Mapping class: com.infra.persistence.bean.Event -> events
2006-02-16 16:23:50,722 (org.hibernate.cfg.HbmBinder) - Mapped property: eventId -> event_id
2006-02-16 16:23:50,722 (org.hibernate.cfg.HbmBinder) - Mapped property: eventDate -> event_date
2006-02-16 16:23:50,722 (org.hibernate.cfg.HbmBinder) - Mapped property: title -> title
2006-02-16 16:23:50,722 (org.hibernate.cfg.HbmBinder) - Mapped property: personEvents
2006-02-16 16:23:50,722 (org.hibernate.cfg.Configuration) - null<-org.dom4j.tree.DefaultAttribute@13ad085 [Attribute: name resource value "hibernate-config/com/infra/persistence/bean/PersonEvent.hbm.xml"]
2006-02-16 16:23:50,722 (org.hibernate.cfg.Configuration) - Reading mappings from resource: hibernate-config/com/infra/persistence/bean/PersonEvent.hbm.xml
2006-02-16 16:23:50,738 (org.hibernate.util.DTDEntityResolver) - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
2006-02-16 16:23:50,738 (org.hibernate.util.DTDEntityResolver) - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
2006-02-16 16:23:50,754 (org.hibernate.cfg.HbmBinder) - Mapping class: com.infra.persistence.bean.PersonEvent -> person_event
2006-02-16 16:23:50,863 (org.hibernate.cfg.HbmBinder) - Mapped property: event -> event_id
2006-02-16 16:23:50,863 (org.hibernate.cfg.HbmBinder) - Mapped property: person -> person_id
2006-02-16 16:23:50,863 (org.hibernate.cfg.HbmBinder) - Mapped property: comp_id -> event_id, person_id
2006-02-16 16:23:50,863 (org.hibernate.cfg.Configuration) - null<-org.dom4j.tree.DefaultAttribute@110c424 [Attribute: name resource value "hibernate-config/com/infra/persistence/bean/PersonEmailAddr.hbm.xml"]
2006-02-16 16:23:50,863 (org.hibernate.cfg.Configuration) - Reading mappings from resource: hibernate-config/com/infra/persistence/bean/PersonEmailAddr.hbm.xml
2006-02-16 16:23:50,863 (org.hibernate.util.DTDEntityResolver) - trying to locate http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath under org/hibernate/
2006-02-16 16:23:50,863 (org.hibernate.util.DTDEntityResolver) - found http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd in classpath
2006-02-16 16:23:50,879 (org.hibernate.cfg.HbmBinder) - Mapping class: com.infra.persistence.bean.PersonEmailAddr -> person_email_addr
2006-02-16 16:23:50,879 (org.hibernate.cfg.HbmBinder) - Mapped property: emailAddr -> email_addr
2006-02-16 16:23:50,879 (org.hibernate.cfg.HbmBinder) - Mapped property: person -> person_id
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - Configured SessionFactory: null
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - properties: {hibernate.connection.password=rajmohan, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, sun.boot.library.path=D:\Programs\java\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=postgres, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hbm2ddl.auto=update, hibernate.current_session_context_class=thread, java.endorsed.dirs=D:\Programs\java\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=D:\CVSSER~1\cvstemp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., cache.provider_class=org.hibernate.cache.NoCacheProvider, user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=D:\Programs\java\j2sdk1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Programs\java\j2sdk1.4.2_04\bin;D:\Programs\Pervasive Postgres\lib;D:\Programs\Pervasive Postgres\bin;d:\Programs\Pervasive Postgres\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Programs\apache-ant-1.6.2\bin;c:\cygwinCommands;D:\Programs\java\j2sdk1.4.2_04\bin;C:\Program Files\CVSNT\, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.connection.pool_size=1, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\rajmohanp, user.timezone=Asia/Calcutta, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=org.postgresql.Driver, show_sql=true, user.name=rajmohanp, java.class.path=D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\bin;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\antlr-2.7.6rc1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\asm.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\asm-attrs.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\cglib-2.1.3.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-collections-2.1.1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-logging-1.0.4.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\dom4j-1.6.1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\hibernate3.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\jta.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\log4j-1.2.11.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-lang.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\resources;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\postgresql-8.0-311.jdbc3.jar, hibernate.show_sql=true, current_session_context_class=thread, java.vm.specification.version=1.0, java.home=D:\Programs\java\j2sdk1.4.2_04\jre, sun.arch.data.model=32, hibernate.connection.url=jdbc:postgresql://localhost:5432/Globe, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, connection.pool_size=1, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_04, java.ext.dirs=D:\Programs\java\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=D:\Programs\java\j2sdk1.4.2_04\jre\lib\rt.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\i18n.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\jsse.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\jce.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\charsets.jar;D:\Programs\java\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., connection.driver_class=org.postgresql.Driver, file.separator=\, hibernate.hbm2ddl.auto=update, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, connection.url=jdbc:postgresql://localhost:5432/Globe, dialect=org.hibernate.dialect.PostgreSQLDialect, sun.cpu.isalist=pentium i486 i386}
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - Preparing to build session factory with filters : {}
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - processing extends queue
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - processing collection mappings
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Second pass for collection: com.infra.persistence.bean.Person.personEvents
2006-02-16 16:23:50,894 (org.hibernate.cfg.HbmBinder) - Mapping collection: com.infra.persistence.bean.Person.personEvents -> person_event
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Mapped collection key: person_id, one-to-many: com.infra.persistence.bean.PersonEvent
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Second pass for collection: com.infra.persistence.bean.Person.personEmailAddrs
2006-02-16 16:23:50,894 (org.hibernate.cfg.HbmBinder) - Mapping collection: com.infra.persistence.bean.Person.personEmailAddrs -> person_email_addr
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Mapped collection key: person_id, one-to-many: com.infra.persistence.bean.PersonEmailAddr
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Second pass for collection: com.infra.persistence.bean.Event.personEvents
2006-02-16 16:23:50,894 (org.hibernate.cfg.HbmBinder) - Mapping collection: com.infra.persistence.bean.Event.personEvents -> person_event
2006-02-16 16:23:50,894 (org.hibernate.cfg.CollectionSecondPass) - Mapped collection key: event_id, one-to-many: com.infra.persistence.bean.PersonEvent
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - processing association property references
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - processing foreign key constraints
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Person
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Person
2006-02-16 16:23:50,894 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Event
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - Using Hibernate built-in connection pool (not for production use!)
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - Hibernate connection pool size: 1
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - autocommit mode: false
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost:5432/Globe
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - connection properties: {user=postgres, password=rajmohan}
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - total checked-out connections: 0
2006-02-16 16:23:51,160 (org.hibernate.connection.DriverManagerConnectionProvider) - opening new JDBC connection
2006-02-16 16:23:51,347 (org.hibernate.connection.DriverManagerConnectionProvider) - created connection to: jdbc:postgresql://localhost:5432/Globe, Isolation Level: 2
2006-02-16 16:23:51,378 (org.hibernate.cfg.SettingsFactory) - RDBMS: PostgreSQL, version: 8.0.3
2006-02-16 16:23:51,378 (org.hibernate.cfg.SettingsFactory) - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.0 JDBC3 with SSL (build 311)
2006-02-16 16:23:51,378 (org.hibernate.connection.DriverManagerConnectionProvider) - returning connection to pool, pool size: 1
2006-02-16 16:23:51,394 (org.hibernate.dialect.Dialect) - Using dialect: org.hibernate.dialect.PostgreSQLDialect
2006-02-16 16:23:51,410 (org.hibernate.transaction.TransactionFactoryFactory) - Using default transaction strategy (direct JDBC transactions)
2006-02-16 16:23:51,410 (org.hibernate.transaction.TransactionManagerLookupFactory) - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - Automatic flush during beforeCompletion(): disabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - Automatic session close at end of transaction: disabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - JDBC batch size: 15
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - JDBC batch updates for versioned data: disabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - Scrollable result sets: enabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - Wrap result sets: disabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - JDBC3 getGeneratedKeys(): disabled
2006-02-16 16:23:51,410 (org.hibernate.cfg.SettingsFactory) - Connection release mode: auto
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Default batch fetch size: 1
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Generate SQL with comments: disabled
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Order SQL updates by primary key: disabled
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2006-02-16 16:23:51,425 (org.hibernate.hql.ast.ASTQueryTranslatorFactory) - Using ASTQueryTranslatorFactory
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Query language substitutions: {}
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Second-level cache: enabled
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Query cache: disabled
2006-02-16 16:23:51,425 (org.hibernate.cfg.SettingsFactory) - Cache provider: org.hibernate.cache.NoCacheProvider
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Optimize cache for minimal puts: disabled
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Structured second-level cache entries: disabled
2006-02-16 16:23:51,441 (org.hibernate.exception.SQLExceptionConverterFactory) - Using dialect defined converter
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Echoing all SQL to stdout
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Statistics: disabled
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Deleted entity synthetic identifier rollback: disabled
2006-02-16 16:23:51,441 (org.hibernate.cfg.SettingsFactory) - Default entity-mode: pojo
2006-02-16 16:23:51,535 (org.hibernate.impl.SessionFactoryImpl) - building session factory
2006-02-16 16:23:51,535 (org.hibernate.impl.SessionFactoryImpl) - Session factory constructed with filter configurations : {}
2006-02-16 16:23:51,535 (org.hibernate.impl.SessionFactoryImpl) - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=rajmohan, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, sun.boot.library.path=D:\Programs\java\j2sdk1.4.2_04\jre\bin, java.vm.version=1.4.2_04-b05, hibernate.connection.username=postgres, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest, java.runtime.version=1.4.2_04-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hbm2ddl.auto=update, hibernate.current_session_context_class=thread, java.endorsed.dirs=D:\Programs\java\j2sdk1.4.2_04\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=D:\CVSSER~1\cvstemp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, cache.provider_class=org.hibernate.cache.NoCacheProvider, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=D:\Programs\java\j2sdk1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Programs\java\j2sdk1.4.2_04\bin;D:\Programs\Pervasive Postgres\lib;D:\Programs\Pervasive Postgres\bin;d:\Programs\Pervasive Postgres\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Programs\apache-ant-1.6.2\bin;c:\cygwinCommands;D:\Programs\java\j2sdk1.4.2_04\bin;C:\Program Files\CVSNT\, java.specification.name=Java Platform API Specification, java.class.version=48.0, hibernate.connection.pool_size=1, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\rajmohanp, user.timezone=Asia/Calcutta, java.awt.printerjob=sun.awt.windows.WPrinterJob, java.specification.version=1.4, file.encoding=Cp1252, hibernate.connection.driver_class=org.postgresql.Driver, show_sql=true, java.class.path=D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\bin;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\antlr-2.7.6rc1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\asm.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\asm-attrs.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\cglib-2.1.3.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-collections-2.1.1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-logging-1.0.4.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\dom4j-1.6.1.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\hibernate3.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\jta.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\log4j-1.2.11.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\commons-lang.jar;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\resources;D:\Programs\eclipse3.1\eclipse\workspace\HibernateCompTest\lib\postgresql-8.0-311.jdbc3.jar, user.name=rajmohanp, hibernate.show_sql=true, current_session_context_class=thread, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=D:\Programs\java\j2sdk1.4.2_04\jre, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql://localhost:5432/Globe, java.specification.vendor=Sun Microsystems Inc., user.language=en, connection.pool_size=1, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, hibernate.cglib.use_reflection_optimizer=true, java.version=1.4.2_04, java.ext.dirs=D:\Programs\java\j2sdk1.4.2_04\jre\lib\ext, sun.boot.class.path=D:\Programs\java\j2sdk1.4.2_04\jre\lib\rt.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\i18n.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\sunrsasign.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\jsse.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\jce.jar;D:\Programs\java\j2sdk1.4.2_04\jre\lib\charsets.jar;D:\Programs\java\j2sdk1.4.2_04\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, connection.driver_class=org.postgresql.Driver, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, hibernate.hbm2ddl.auto=update, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, connection.url=jdbc:postgresql://localhost:5432/Globe, sun.cpu.isalist=pentium i486 i386, dialect=org.hibernate.dialect.PostgreSQLDialect}
2006-02-16 16:23:51,785 (org.hibernate.persister.entity.AbstractEntityPersister) - Static SQL for entity: com.infra.persistence.bean.Event
2006-02-16 16:23:51,785 (org.hibernate.persister.entity.AbstractEntityPersister) - Version select: select event_id from events where event_id =?
2006-02-16 16:23:51,785 (org.hibernate.persister.entity.AbstractEntityPersister) - Snapshot select: select event_.event_id, event_.event_date as event2_1_, event_.title as title1_ from events event_ where event_.event_id=?
2006-02-16 16:23:51,785 (org.hibernate.persister.entity.AbstractEntityPersister) - Insert 0: insert into events (event_date, title, event_id) values (?, ?, ?)
2006-02-16 16:23:51,800 (org.hibernate.persister.entity.AbstractEntityPersister) - Update 0: update events set event_date=?, title=? where event_id=?
2006-02-16 16:23:51,800 (org.hibernate.persister.entity.AbstractEntityPersister) - Delete 0: delete from events where event_id=?
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Static SQL for entity: com.infra.persistence.bean.PersonEmailAddr
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Version select: select email_addr from person_email_addr where email_addr =?
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Snapshot select: select personemai_.email_addr, personemai_.person_id as person2_3_ from person_email_addr personemai_ where personemai_.email_addr=?
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Insert 0: insert into person_email_addr (person_id, email_addr) values (?, ?)
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Update 0: update person_email_addr set person_id=? where email_addr=?
2006-02-16 16:23:51,816 (org.hibernate.persister.entity.AbstractEntityPersister) - Delete 0: delete from person_email_addr where email_addr=?
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Static SQL for entity: com.infra.persistence.bean.Person
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Version select: select person_id from person where person_id =?
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Snapshot select: select person_.person_id, person_.age as age0_, person_.firstname as firstname0_, person_.lastname as lastname0_ from person person_ where person_.person_id=?
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Insert 0: insert into person (age, firstname, lastname, person_id) values (?, ?, ?, ?)
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Update 0: update person set age=?, firstname=?, lastname=? where person_id=?
2006-02-16 16:23:51,847 (org.hibernate.persister.entity.AbstractEntityPersister) - Delete 0: delete from person where person_id=?
2006-02-16 16:23:51,863 (org.hibernate.persister.entity.AbstractEntityPersister) - Static SQL for entity: com.infra.persistence.bean.PersonEvent
2006-02-16 16:23:51,863 (org.hibernate.persister.entity.AbstractEntityPersister) - Version select: select event_id, person_id from person_event where event_id =? and person_id =?
2006-02-16 16:23:51,878 (org.hibernate.persister.entity.AbstractEntityPersister) - Snapshot select: select personeven_.event_id, personeven_.person_id from person_event personeven_ where personeven_.event_id=? and personeven_.person_id=?
2006-02-16 16:23:51,878 (org.hibernate.persister.entity.AbstractEntityPersister) - Insert 0: insert into person_event (event_id, person_id) values (?, ?)
2006-02-16 16:23:51,878 (org.hibernate.persister.entity.AbstractEntityPersister) - Update 0: null
2006-02-16 16:23:51,878 (org.hibernate.persister.entity.AbstractEntityPersister) - Delete 0: delete from person_event where event_id=? and person_id=?
2006-02-16 16:23:51,878 (org.hibernate.persister.collection.AbstractCollectionPersister) - Static SQL for collection: com.infra.persistence.bean.Event.personEvents
2006-02-16 16:23:51,878 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row insert: update person_event set event_id=? where event_id=? and person_id=?
2006-02-16 16:23:51,878 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row delete: update person_event set event_id=null where event_id=? and event_id=? and person_id=?
2006-02-16 16:23:51,878 (org.hibernate.persister.collection.AbstractCollectionPersister) - One-shot delete: update person_event set event_id=null where event_id=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Static SQL for collection: com.infra.persistence.bean.Person.personEmailAddrs
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row insert: update person_email_addr set person_id=? where email_addr=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row delete: update person_email_addr set person_id=null where person_id=? and email_addr=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - One-shot delete: update person_email_addr set person_id=null where person_id=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Static SQL for collection: com.infra.persistence.bean.Person.personEvents
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row insert: update person_event set person_id=? where event_id=? and person_id=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - Row delete: update person_event set person_id=null where person_id=? and event_id=? and person_id=?
2006-02-16 16:23:51,910 (org.hibernate.persister.collection.AbstractCollectionPersister) - One-shot delete: update person_event set person_id=null where person_id=?
2006-02-16 16:23:51,956 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=?
2006-02-16 16:23:51,956 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=?
2006-02-16 16:23:51,956 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=? for update
2006-02-16 16:23:51,956 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=? for update
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_MERGE on entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_REFRESH on entity com.infra.persistence.bean.Event: select event0_.event_id as event1_1_0_, event0_.event_date as event2_1_0_, event0_.title as title1_0_ from events event0_ where event0_.event_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=? for update
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=? for update
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_MERGE on entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_REFRESH on entity com.infra.persistence.bean.Person: select person0_.person_id as person1_0_0_, person0_.age as age0_0_, person0_.firstname as firstname0_0_, person0_.lastname as lastname0_0_ from person person0_ where person0_.person_id=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=?
2006-02-16 16:23:51,972 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=? for update
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=? for update
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_MERGE on entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_REFRESH on entity com.infra.persistence.bean.PersonEmailAddr: select personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.email_addr=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=? for update
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=? for update
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_MERGE on entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.entity.EntityLoader) - Static select for action ACTION_REFRESH on entity com.infra.persistence.bean.PersonEvent: select personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=? and personeven0_.person_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.collection.OneToManyLoader) - Static select for one-to-many com.infra.persistence.bean.Event.personEvents: select personeven0_.event_id as event1_1_, personeven0_.person_id as person2_1_, personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.event_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.collection.OneToManyLoader) - Static select for one-to-many com.infra.persistence.bean.Person.personEmailAddrs: select personemai0_.person_id as person2_1_, personemai0_.email_addr as email1_1_, personemai0_.email_addr as email1_3_0_, personemai0_.person_id as person2_3_0_ from person_email_addr personemai0_ where personemai0_.person_id=?
2006-02-16 16:23:51,988 (org.hibernate.loader.collection.OneToManyLoader) - Static select for one-to-many com.infra.persistence.bean.Person.personEvents: select personeven0_.person_id as person2_1_, personeven0_.event_id as event1_1_, personeven0_.event_id as event1_2_0_, personeven0_.person_id as person2_2_0_ from person_event personeven0_ where personeven0_.person_id=?
2006-02-16 16:23:52,003 (org.hibernate.impl.SessionFactoryObjectFactory) - initializing class SessionFactoryObjectFactory
2006-02-16 16:23:52,003 (org.hibernate.impl.SessionFactoryObjectFactory) - registered: 4028151809727e940109727e95f40000 (unnamed)
2006-02-16 16:23:52,003 (org.hibernate.impl.SessionFactoryObjectFactory) - Not binding factory to JNDI, no JNDI name configured
2006-02-16 16:23:52,003 (org.hibernate.impl.SessionFactoryImpl) - instantiated session factory
2006-02-16 16:23:52,003 (org.hibernate.tool.hbm2ddl.SchemaUpdate) - Running hbm2ddl schema update
2006-02-16 16:23:52,003 (org.hibernate.tool.hbm2ddl.SchemaUpdate) - fetching database metadata
2006-02-16 16:23:52,003 (org.hibernate.connection.DriverManagerConnectionProvider) - total checked-out connections: 0
2006-02-16 16:23:52,003 (org.hibernate.connection.DriverManagerConnectionProvider) - using pooled JDBC connection, pool size: 0
2006-02-16 16:23:52,003 (org.hibernate.tool.hbm2ddl.SchemaUpdate) - updating schema
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - processing extends queue
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - processing collection mappings
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - processing association property references
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - processing foreign key constraints
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Person
2006-02-16 16:23:52,003 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Person
2006-02-16 16:23:52,035 (org.hibernate.cfg.Configuration) - resolving reference to class: com.infra.persistence.bean.Event
2006-02-16 16:23:52,206 (org.hibernate.tool.hbm2ddl.TableMetadata) - table found: public.events
2006-02-16 16:23:52,206 (org.hibernate.tool.hbm2ddl.TableMetadata) - columns: [event_id, title, event_date]
2006-02-16 16:23:52,206 (org.hibernate.tool.hbm2ddl.TableMetadata) - foreign keys: []
2006-02-16 16:23:52,206 (org.hibernate.tool.hbm2ddl.TableMetadata) - indexes: [events_pkey]
2006-02-16 16:23:52,285 (org.hibernate.tool.hbm2ddl.TableMetadata) - table found: public.person
2006-02-16 16:23:52,285 (org.hibernate.tool.hbm2ddl.TableMetadata) - columns: [lastname, age, person_id, firstname]
2006-02-16 16:23:52,285 (org.hibernate.tool.hbm2ddl.TableMetadata) - foreign keys: []
2006-02-16 16:23:52,285 (org.hibernate.tool.hbm2ddl.TableMetadata) - indexes: [pkey, person_pkey]
2006-02-16 16:23:52,378 (org.hibernate.tool.hbm2ddl.TableMetadata) - table found: public.person_email_addr
2006-02-16 16:23:52,378 (org.hibernate.tool.hbm2ddl.TableMetadata) - columns: [person_id, email_addr]
2006-02-16 16:23:52,378 (org.hibernate.tool.hbm2ddl.TableMetadata) - foreign keys: [fkbc8adde7b531f1e, fka54215fe7708282f]
2006-02-16 16:23:52,378 (org.hibernate.tool.hbm2ddl.TableMetadata) - indexes: []
2006-02-16 16:23:52,456 (org.hibernate.tool.hbm2ddl.TableMetadata) - table found: public.person_event
2006-02-16 16:23:52,456 (org.hibernate.tool.hbm2ddl.TableMetadata) - columns: [event_id, person_id]
2006-02-16 16:23:52,456 (org.hibernate.tool.hbm2ddl.TableMetadata) - foreign keys: [fkad91d9107708282f, fkad91d910f96d1a45, fkecd7dd30b7800976, fkecd7dd307b531f1e]
2006-02-16 16:23:52,456 (org.hibernate.tool.hbm2ddl.TableMetadata) - indexes: [person_event_pkey]
2006-02-16 16:23:52,456 (org.hibernate.tool.hbm2ddl.SchemaUpdate) - schema update complete
2006-02-16 16:23:52,456 (org.hibernate.connection.DriverManagerConnectionProvider) - cleaning up connection pool: jdbc:postgresql://localhost:5432/Globe
2006-02-16 16:23:52,456 (org.hibernate.impl.SessionFactoryImpl) - Checking 0 named HQL queries
2006-02-16 16:23:52,456 (org.hibernate.impl.SessionFactoryImpl) - Checking 0 named SQL queries
2006-02-16 16:23:52,534 (org.hibernate.impl.SessionImpl) - opened session at timestamp: 11400872325
2006-02-16 16:23:52,628 (org.hibernate.context.ThreadLocalSessionContext) - allowing method [beginTransaction] in non-transacted context
2006-02-16 16:23:52,628 (org.hibernate.transaction.JDBCTransaction) - begin
2006-02-16 16:23:52,628 (org.hibernate.jdbc.ConnectionManager) - opening JDBC connection
2006-02-16 16:23:52,628 (org.hibernate.connection.DriverManagerConnectionProvider) - total checked-out connections: 1
2006-02-16 16:23:52,628 (org.hibernate.connection.DriverManagerConnectionProvider) - opening new JDBC connection
2006-02-16 16:23:52,675 (org.hibernate.connection.DriverManagerConnectionProvider) - created connection to: jdbc:postgresql://localhost:5432/Globe, Isolation Level: 2
2006-02-16 16:23:52,691 (org.hibernate.transaction.JDBCTransaction) - current autocommit status: false
2006-02-16 16:23:52,691 (org.hibernate.jdbc.JDBCContext) - after transaction begin
2006-02-16 16:23:52,691 (org.hibernate.event.def.DefaultSaveOrUpdateEventListener) - saving transient instance
2006-02-16 16:23:52,691 (org.hibernate.event.def.AbstractSaveEventListener) - generated identifier: 103, using strategy: org.hibernate.id.Assigned
2006-02-16 16:23:52,691 (org.hibernate.event.def.AbstractSaveEventListener) - saving [com.infra.persistence.bean.Person#103]
2006-02-16 16:23:52,706 (org.hibernate.event.def.WrapVisitor) - Wrapped collection in role: com.infra.persistence.bean.Person.personEmailAddrs
2006-02-16 16:23:52,722 (org.hibernate.transaction.JDBCTransaction) - commit
2006-02-16 16:23:52,722 (org.hibernate.impl.SessionImpl) - automatically flushing session
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - flushing session
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - processing flush-time cascades
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - dirty checking collections
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - Flushing entities and processing referenced collections
2006-02-16 16:23:52,722 (org.hibernate.engine.Collections) - Collection found: [com.infra.persistence.bean.Person.personEmailAddrs#103], was: [<unreferenced>] (initialized)
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - Processing unreferenced collections
2006-02-16 16:23:52,722 (org.hibernate.event.def.AbstractFlushingEventListener) - Scheduling collection removes/(re)creates/updates
2006-02-16 16:23:52,738 (org.hibernate.event.def.AbstractFlushingEventListener) - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
2006-02-16 16:23:52,738 (org.hibernate.event.def.AbstractFlushingEventListener) - Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
2006-02-16 16:23:52,738 (org.hibernate.pretty.Printer) - listing entities:
2006-02-16 16:23:52,738 (org.hibernate.pretty.Printer) - com.infra.persistence.bean.Person{lastname=ABC, age=22, firstname=XYZ, personId=103, personEmailAddrs=[com.infra.persistence.bean.PersonEmailAddr], personEvents=null}
2006-02-16 16:23:52,738 (org.hibernate.event.def.AbstractFlushingEventListener) - executing flush
2006-02-16 16:23:52,738 (org.hibernate.persister.entity.AbstractEntityPersister) - Inserting entity: [com.infra.persistence.bean.Person#103]
2006-02-16 16:23:52,738 (org.hibernate.jdbc.AbstractBatcher) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2006-02-16 16:23:52,738 (org.hibernate.SQL) - insert into person (age, firstname, lastname, person_id) values (?, ?, ?, ?)
Hibernate: insert into person (age, firstname, lastname, person_id) values (?, ?, ?, ?)
2006-02-16 16:23:52,738 (org.hibernate.jdbc.AbstractBatcher) - preparing statement
2006-02-16 16:23:52,738 (org.hibernate.persister.entity.AbstractEntityPersister) - Dehydrating entity: [com.infra.persistence.bean.Person#103]
2006-02-16 16:23:52,738 (org.hibernate.type.IntegerType) - binding '22' to parameter: 1
2006-02-16 16:23:52,738 (org.hibernate.type.StringType) - binding 'XYZ' to parameter: 2
2006-02-16 16:23:52,738 (org.hibernate.type.StringType) - binding 'ABC' to parameter: 3
2006-02-16 16:23:52,738 (org.hibernate.type.LongType) - binding '103' to parameter: 4
2006-02-16 16:23:52,738 (org.hibernate.jdbc.AbstractBatcher) - Adding to batch
2006-02-16 16:23:52,738 (org.hibernate.jdbc.AbstractBatcher) - Executing batch size: 1
2006-02-16 16:23:52,753 (org.hibernate.jdbc.AbstractBatcher) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2006-02-16 16:23:52,753 (org.hibernate.jdbc.AbstractBatcher) - closing statement
2006-02-16 16:23:52,753 (org.hibernate.event.def.AbstractFlushingEventListener) - post flush
2006-02-16 16:23:52,753 (org.hibernate.jdbc.JDBCContext) - before transaction completion
2006-02-16 16:23:52,753 (org.hibernate.impl.SessionImpl) - before transaction completion
2006-02-16 16:23:52,769 (org.hibernate.transaction.JDBCTransaction) - committed JDBC Connection
2006-02-16 16:23:52,769 (org.hibernate.jdbc.JDBCContext) - after transaction completion
2006-02-16 16:23:52,769 (org.hibernate.jdbc.ConnectionManager) - aggressively releasing JDBC connection
2006-02-16 16:23:52,769 (org.hibernate.jdbc.ConnectionManager) - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2006-02-16 16:23:52,769 (org.hibernate.connection.DriverManagerConnectionProvider) - returning connection to pool, pool size: 1
2006-02-16 16:23:52,769 (org.hibernate.impl.SessionImpl) - after transaction completion
2006-02-16 16:23:52,769 (org.hibernate.impl.SessionImpl) - automatically closing session
2006-02-16 16:23:52,769 (org.hibernate.impl.SessionImpl) - closing session
2006-02-16 16:23:52,769 (org.hibernate.jdbc.ConnectionManager) - connection already null in cleanup : no action



Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 16, 2006 8:24 am 
Newbie

Joined: Thu Feb 16, 2006 6:43 am
Posts: 5
Location: Bangalore, India
I am able to solve the problem I added cascade="all" in the association mapping as shown below
<!-- bi-directional one-to-many association to PersonEmailAddr -->
<set
name="personEmailAddrs"
lazy="true"
inverse="true"
cascade="all"
>
<key>
<column name="person_id" />
</key>
<one-to-many
class="com.infra.persistence.bean.PersonEmailAddr"
/>
</set>

But the problem still exists in hibernate version 2.0. Even if i use cascade="all" it is not saving the associated objects

The only difference in code is i am using the way it is used in version 2.0

net.sf.hibernate.Session session = com.aztec.util.HibernateUtil.getSessionFactory().openSession();
Transaction transaction = session.beginTransaction();
Person person = new Person();
person.setAge(22);
person.setFirstname("XYZ");
person.setLastname("ABC");
person.setPersonId(new Long(110));
Set set1 = new HashSet();
PersonEmailAddr email = new PersonEmailAddr();
email.setEmailAddr("abcdefjkl@aabc.com");
email.setPersonByPersonId(person);
set1.add(email);
person.setPersonEmailAddrsByPersonId(set1);
session.save(person);
transaction.commit();

regards
Rajmohan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.