-->
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.  [ 3 posts ] 
Author Message
 Post subject: getting new generated ID in Interceptor - is it possible?
PostPosted: Tue Oct 14, 2008 11:42 am 
Newbie

Joined: Fri Aug 29, 2008 9:07 am
Posts: 16
Location: edinburgh/zielona gora
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2.6.ga

Hello all. I spent whole day browsing trought docs and Internet but didn't find any answer so I have to ask here.

Is there any chance to get new created id in interceptor.OnSave ??
If not in onSave then in which 'on' method I would be able to get new id of just persisted object (id not selected, autogenerate set for @id).
onFlushDirty is not called at all.

I need that Id to for my logger.

Cheers for any help


Top
 Profile  
 
 Post subject: BUG in documentation?!
PostPosted: Wed Oct 15, 2008 6:16 am 
Newbie

Joined: Fri Aug 29, 2008 9:07 am
Posts: 16
Location: edinburgh/zielona gora
url:

IS:

Instead, you may register it programmatically:

Configuration cfg = new Configuration();
LoadEventListener[] stack = { new MyLoadListener(), new DefaultLoadEventListener() };
cfg.EventListeners().setLoadEventListeners(stack);

should be:

Configuration cfg = new Configuration();
LoadEventListener[] stack = { new MyLoadListener(), new DefaultLoadEventListener() };
cfg.getEventListeners().setLoadEventListeners(stack);

Am I right or just usign different version?


Top
 Profile  
 
 Post subject: BUG in documentation?!
PostPosted: Wed Oct 15, 2008 6:17 am 
Newbie

Joined: Fri Aug 29, 2008 9:07 am
Posts: 16
Location: edinburgh/zielona gora
url: http://www.hibernate.org/hib_docs/v3/re ... le/#events

IS:

Instead, you may register it programmatically:

Configuration cfg = new Configuration();
LoadEventListener[] stack = { new MyLoadListener(), new DefaultLoadEventListener() };
cfg.EventListeners().setLoadEventListeners(stack);

should be:

Configuration cfg = new Configuration();
LoadEventListener[] stack = { new MyLoadListener(), new DefaultLoadEventListener() };
cfg.getEventListeners().setLoadEventListeners(stack);

Am I right or just usign different version?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.