Re: [hibernate-dev] Hibernate Search road map

2009-03-06 Thread Sanne Grinovero
Thanks; I guess you are referring to HSEARCH-178 instead,
not the listener registration ;-)

I'm linking the issue to HHH-2763 too, as it seems related and Steve
is having interesting comments
about this there.

2009/3/6 Emmanuel Bernard :
>
> On  Feb 25, 2009, at 06:19, Sanne Grinovero wrote:
>
>> HSEARCH-314 is quite annoying and I've run out of ideas to propose;
>> any direction from someone?
>> It would be nice if the solution could be reused also by other
>> listeners (a topic for JPA2 spec?)
>
> See my other email on the Core issue. It's not entirely in my hands, more on
> Steve's
>
>

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] HHH-3225 is hitting Hibernate Search

2009-03-06 Thread Emmanuel Bernard

Ahhh
In theory it should not as Hibernate Search reads data in the  
beforeCompletion phase.
Unless people do not apply changes in a transaction in which case we  
need to execute the read in the post* event.


We will check whether or not people use surrounding transactions  
(Hibernate aware Tx either through JTA or via the direct Hibernate  
Transaction API).
Alternatively, is it possible to move the post* event after the flush?  
Or create noew events for that? That would solve everybody's issue.


Emmanuel

On  Mar 5, 2009, at 22:54, Steve Ebersole wrote:


Is this somehow different than the "attempt to load stuff into the PC
during flush" scenarios I see in any of these related issues?

-

Steve Ebersole
Project Lead
http://hibernate.org
st...@hibernate.org

Principal Software Engineer
JBoss, a division of Red Hat
http://jboss.com
http://redhat.com
steve.ebers...@jboss.com
steve.ebers...@redhat.com


On Thu, 2009-03-05 at 19:14 -0500, Emmanuel Bernard wrote:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3225

Steve, any chance you could look at this one, it seems to hit HSearch
users on a regular basis.
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev




___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] HHH-3225 is hitting Hibernate Search

2009-03-06 Thread Steve Ebersole
Not sure what you mean by your "In theory it should not"...  The very
nature of @PostUpdate is that it is going to be getting called during a
flush cycle...



wrt "is it possible to move the post* event after the flush?"...

There are really 2 answers.

1) According to the JPA spec, can we do this?  The quote from the
current spec says:

The PreUpdate and PostUpdate callbacks occur before and after the
database update operations to
entity data respectively. These database operations may occur at the
time the entity state is updated or
they may occur at the time state is flushed to the database (which may
be at the end of the transaction).

I don't really see anything there that discusses the time-relationship
between the SQL UPDATE execution and the @PostUpdate callback other than
the fact that (obviously) @PostUpdate callback should come after the SQL
UPDATE is issued; but it does not seem to limit *how long after*.  So I
think this is OK from the perspective of the spec.

2) Can Hibernate be changed to do this?  Well AnythingIsPossible in
programming, so I guess the question really is *should* we change
Hibernate to do this.  My main concern with this change is the extra
queueing it would require and the corollary memory requirements.  What
happens right now is that those callbacks are executed during the action
(org.hibernate.action.Executable) execution.  Flush puts them into a
queue of actions (org.hibernate.engine.ActionQueue), from which they are
removed as they are executed.  We decided to put the post callbacks in
the actions themselves for assurance-of-execution as well as
encapsulation purposes, which I think are both still worthwhile.  What I
could see as a potential solution would be to do something like we do
for Actions which have "after transaction" tasks to perform:
http://fisheye.jboss.org/browse/Hibernate/core/trunk/core/src/main/java/org/hibernate/engine/ActionQueue.java?r=16091#l271

The "executions" list here is a queue of actions which we need to keep
around for later.  I can see something like that in conjunction with a
method on ActionQueue to process that internal 'callbacks' queue after
the entire flush is complete.  Note that this does not address
@PreUpdate.

We can investigate that though and see what we are talking about in
specific.

-  

Steve Ebersole
Project Lead
http://hibernate.org
st...@hibernate.org

Principal Software Engineer
JBoss, a division of Red Hat
http://jboss.com
http://redhat.com
steve.ebers...@jboss.com
steve.ebers...@redhat.com


On Fri, 2009-03-06 at 09:07 -0500, Emmanuel Bernard wrote:
> Ahhh
> In theory it should not as Hibernate Search reads data in the  
> beforeCompletion phase.
> Unless people do not apply changes in a transaction in which case we  
> need to execute the read in the post* event.
> 
> We will check whether or not people use surrounding transactions  
> (Hibernate aware Tx either through JTA or via the direct Hibernate  
> Transaction API).
> Alternatively, is it possible to move the post* event after the flush?  
> Or create noew events for that? That would solve everybody's issue.
> 
> Emmanuel
> 
> On  Mar 5, 2009, at 22:54, Steve Ebersole wrote:
> 
> > Is this somehow different than the "attempt to load stuff into the PC
> > during flush" scenarios I see in any of these related issues?
> >
> > -
> >
> > Steve Ebersole
> > Project Lead
> > http://hibernate.org
> > st...@hibernate.org
> >
> > Principal Software Engineer
> > JBoss, a division of Red Hat
> > http://jboss.com
> > http://redhat.com
> > steve.ebers...@jboss.com
> > steve.ebers...@redhat.com
> >
> >
> > On Thu, 2009-03-05 at 19:14 -0500, Emmanuel Bernard wrote:
> >> http://opensource.atlassian.com/projects/hibernate/browse/HHH-3225
> >>
> >> Steve, any chance you could look at this one, it seems to hit HSearch
> >> users on a regular basis.
> >> ___
> >> hibernate-dev mailing list
> >> hibernate-dev@lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> 

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] Regarding HSEARCH-248

2009-03-06 Thread Ing. Arturo Frappé Muñoz


Good evening Lords and Ladys: 
I'm using SQLServer 2000 and Hibernate
Search 3.1.0, when I'm following Hibernate Search In Action, I found this
bug (HSEARCH-248).

I'm asking for a hint on where to debug and
for any ideas  to fix the generated query.

Since I'm not
an SQLServer 2000 expert, I think that this bug may be solved with this
recipe:
1. Convert to varchar  and concatenate  all tuples
involved in the where as well as its corresponding values.
2.
Timestamp tuples must be considered to be converted, whit SQLServer 21
conversion type.

Example of resulting query: 

select

this_.CV_CURP as CV2_47_0_
from EC.dbo.TEXTO_PACIENTE this_ 
where this_.id_tipo_texto='23' and 
 
(CONVERT(VARCHAR,this_.CV_CURP)+CONVERT(VARCHAR,this_.TM_EVENTO,21)+
CONVERT(VARCHAR,this_.ID_TIPO_TEXTO)) in (
 
(CONVERT(VARCHAR,?)+CONVERT(VARCHAR,?,21)+CONVERT(VARCHAR,?)))



Cheers, 
Arturo
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Regarding HSEARCH-248

2009-03-06 Thread Hardy Ferentschik

Hi,

you are right HSEARCH-248 re-appeared. Thanks for the tip. I added some  
comments on the issue
and created HSEARCH-346. The fix is quite easy. We will have to add a  
proper test i order to make

sure that this won't happen again.

--Hardy

On Fri, 06 Mar 2009 17:09:22 +0100, Ing. Arturo Frappé Muñoz  
 wrote:



Good evening Lords and Ladys:
I'm using SQLServer 2000 and Hibernate
Search 3.1.0, when I'm following Hibernate Search In Action, I found this
bug (HSEARCH-248).




___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev