-->
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.  [ 1 post ] 
Author Message
 Post subject: how to work with AbstractPostInsertGenerator getGenerated
PostPosted: Thu Jan 12, 2006 3:11 am 
Newbie

Joined: Sun Jan 01, 2006 12:53 pm
Posts: 11
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.0

Mapping documents:<class
name="com.Article"
table="t_article"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>

<id name="articleCompId" type="com.ArticleUserTypeId">
<column name="article_id"/>
<column name="article_version"/>
<generator class="com.ArticleNewIdentifierGenerator" />

</id>
</class>

</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
save(article);
contenet.setArticle(article);


Full stack trace of any exception that occurs:12:21:13,491 INFO [STDOUT] this is in ArticleNewIdentifierGenerator generate method
12:21:13,506 INFO [STDOUT] Hibernate: insert into t_article (version, active_flag, article_type_id, author, create_date, create_user_id, expiration_date, introduction, language_id, last_update_date, inactivate_date, post_date, post_profile_id, post_user_id, publish_date, publisher, review_date, rev
iew_user_id, status_change_date, update_user_id, url, website_id, workflow_status_id, article_id, article_version) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
12:21:13,506 INFO [STDOUT] newArticleId after session flushnull
12:21:13,506 INFO [ArticleDAO] Leaving createArticle() method in ArticleDAO


Name and version of the database you are using:mysql

The generated SQL (show_sql=true):


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

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.