[Hibernate] Query by Criteria ..

2005-09-27 Thread sergiu gordea



Hi all,

I'm new to Hibernate, and maybe I shouldn't post this question here, 
but I also don't think that the

user-list  may  answer to it.

Until now I used Torque, and I found  very usefull the  generated 
constants for Table and Column-names.
Does Hibernate provide such a functionality? In my opinion that is a 
great help for developers, and is a good practive from

quality assurance point of view.

Best,

Sergiu


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Query by Criteria ..

2005-09-27 Thread Max Rydahl Andersen


go to the user forum.

thanks,
-max




 Hi all,

 I'm new to Hibernate, and maybe I shouldn't post this question here,  
but I also don't think that the

user-list  may  answer to it.

 Until now I used Torque, and I found  very usefull the  generated  
constants for Table and Column-names.
Does Hibernate provide such a functionality? In my opinion that is a  
great help for developers, and is a good practive from

quality assurance point of view.

 Best,

 Sergiu


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.  
Download

it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] sessionfactoryimpl.close()

2005-09-27 Thread Gavin King
I think it would be perfectly reasonable to clear the internal
collections. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Max
Rydahl Andersen
Sent: Monday, 26 September 2005 3:20 PM
To: Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()

 OTOH, this will consume some extra CPU time for nothing since the GC 
 will do that job anyway.

is sf.close() cpu critical ? Even with a clean up it shouldn't be bad,
or ?

/max


 Max Rydahl Andersen wrote:

 Hi guys,

 Any reason why we don't empty all the collections we are holding onto

 in  the sessionfactory ?
 Are we just letting that be up to the garbage collector to handle or 
 how ?  :)

 It is not a memory leak as the garbage collector will get them when 
 the  user actually lets go
 of the sessionfactory (sf = null), but it could probably save us some

 forum argumenting since
 a profiler will list the sessionfactory as a leach even after
 sf.close()  has been called.





--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42 plasma tv or your
very own Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] sessionfactoryimpl.close()

2005-09-27 Thread Max Rydahl Andersen

Hi,

We tried to do this but it requires us to un-final stuff and that
is not worth it.

Instead I added a comment to sf.close() about the importance of actually
not keeping a reference to the sf when it is not wanted anymore.

/max


I think it would be perfectly reasonable to clear the internal
collections.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Max
Rydahl Andersen
Sent: Monday, 26 September 2005 3:20 PM
To: Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()


OTOH, this will consume some extra CPU time for nothing since the GC
will do that job anyway.


is sf.close() cpu critical ? Even with a clean up it shouldn't be bad,
or ?

/max



Max Rydahl Andersen wrote:


Hi guys,

Any reason why we don't empty all the collections we are holding onto



in  the sessionfactory ?
Are we just letting that be up to the garbage collector to handle or
how ?  :)

It is not a memory leak as the garbage collector will get them when
the  user actually lets go
of the sessionfactory (sf = null), but it could probably save us some



forum argumenting since
a profiler will list the sessionfactory as a leach even after
sf.close()  has been called.







--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42 plasma tv or your
very own Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel




--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] sessionfactoryimpl.close()

2005-09-27 Thread Steve Ebersole
Why?  You can call clear() on collections marked as final.  Obviously
you could not null them out...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Max
Rydahl Andersen
Sent: Tuesday, September 27, 2005 8:44 AM
To: Gavin King; Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()

Hi,

We tried to do this but it requires us to un-final stuff and that
is not worth it.

Instead I added a comment to sf.close() about the importance of actually
not keeping a reference to the sf when it is not wanted anymore.

/max

 I think it would be perfectly reasonable to clear the internal
 collections.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Max
 Rydahl Andersen
 Sent: Monday, 26 September 2005 3:20 PM
 To: Emmanuel Bernard
 Cc: Hibernate development
 Subject: Re: [Hibernate] sessionfactoryimpl.close()

 OTOH, this will consume some extra CPU time for nothing since the GC
 will do that job anyway.

 is sf.close() cpu critical ? Even with a clean up it shouldn't be bad,
 or ?

 /max


 Max Rydahl Andersen wrote:

 Hi guys,

 Any reason why we don't empty all the collections we are holding
onto

 in  the sessionfactory ?
 Are we just letting that be up to the garbage collector to handle or
 how ?  :)

 It is not a memory leak as the garbage collector will get them when
 the  user actually lets go
 of the sessionfactory (sf = null), but it could probably save us
some

 forum argumenting since
 a profiler will list the sessionfactory as a leach even after
 sf.close()  has been called.





 --
 --
 Max Rydahl Andersen
 callto://max.rydahl.andersen

 Hibernate
 [EMAIL PROTECTED]
 http://hibernate.org

 JBoss Inc
 [EMAIL PROTECTED]
 http://www.jboss.com/events/jbossworld
 JBoss World Barcelona 10-12 October


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
 Download it for free - -and be entered to win a 42 plasma tv or your
 very own Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
 ___
 hibernate-devel mailing list
 hibernate-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-- 
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] unsubscribe

2005-09-27 Thread Fikri




Hi,
There is NO information on the page mailing list page
(https://lists.sourceforge.net/lists/listinfo/hibernate-devel)
on how to UNsubscribe


Gavin King wrote:

  They are wrapped in UnmodifiableBlahBlah 

-Original Message-
From: Steve Ebersole 
Sent: Tuesday, 27 September 2005 3:49 PM
To: Max Andersen; Gavin King; Emmanuel Bernard
Cc: Hibernate development
Subject: RE: [Hibernate] sessionfactoryimpl.close()

Why?  You can call clear() on collections marked as final.  Obviously
you could not "null them out"...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Max
Rydahl Andersen
Sent: Tuesday, September 27, 2005 8:44 AM
To: Gavin King; Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()

Hi,

We tried to do this but it requires us to un-final stuff and that is not
worth it.

Instead I added a comment to sf.close() about the importance of actually
not keeping a reference to the sf when it is not wanted anymore.

/max

  
  
I think it would be perfectly reasonable to clear the internal 
collections.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Max 
Rydahl Andersen
Sent: Monday, 26 September 2005 3:20 PM
To: Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()



  OTOH, this will consume some extra CPU time for nothing since the GC 
will do that job anyway.
  

is sf.close() cpu critical ? Even with a clean up it shouldn't be bad,

  
  
  
  
or ?

/max



  Max Rydahl Andersen wrote:

  
  
Hi guys,

Any reason why we don't empty all the collections we are holding 
onto

  


  
in  the sessionfactory ?
Are we just letting that be up to the garbage collector to handle or

  

  
  
  
  

  
how ?  :)

It is not a memory leak as the garbage collector will get them when 
the  user actually lets go of the sessionfactory (sf = null), but it

  

  
  
  
  

  
could probably save us some

  


  
forum argumenting since
a profiler will list the sessionfactory as a leach even after
sf.close()  has been called.


  



--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your 
very own Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

  
  


--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your
very own Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
  






---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] sessionfactoryimpl.close()

2005-09-27 Thread Max Rydahl Andersen
On Tue, 27 Sep 2005 15:48:59 +0200, Steve Ebersole  
[EMAIL PROTECTED] wrote:



Why?  You can call clear() on collections marked as final.  Obviously
you could not null them out...


collectionmetadata and classmetadata are unmodifiable and thus cannot be  
cleared and

they contain all the entitypersisters which are the ones I want to let go.

/max



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Max
Rydahl Andersen
Sent: Tuesday, September 27, 2005 8:44 AM
To: Gavin King; Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()

Hi,

We tried to do this but it requires us to un-final stuff and that
is not worth it.

Instead I added a comment to sf.close() about the importance of actually
not keeping a reference to the sf when it is not wanted anymore.

/max


I think it would be perfectly reasonable to clear the internal
collections.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Max
Rydahl Andersen
Sent: Monday, 26 September 2005 3:20 PM
To: Emmanuel Bernard
Cc: Hibernate development
Subject: Re: [Hibernate] sessionfactoryimpl.close()


OTOH, this will consume some extra CPU time for nothing since the GC
will do that job anyway.


is sf.close() cpu critical ? Even with a clean up it shouldn't be bad,
or ?

/max



Max Rydahl Andersen wrote:


Hi guys,

Any reason why we don't empty all the collections we are holding

onto



in  the sessionfactory ?
Are we just letting that be up to the garbage collector to handle or
how ?  :)

It is not a memory leak as the garbage collector will get them when
the  user actually lets go
of the sessionfactory (sf = null), but it could probably save us

some



forum argumenting since
a profiler will list the sessionfactory as a leach even after
sf.close()  has been called.







--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42 plasma tv or your
very own Sony(tm)PSP.  Click here to play:
http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel








--
--
Max Rydahl Andersen
callto://max.rydahl.andersen

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://www.jboss.com/events/jbossworld
JBoss World Barcelona 10-12 October


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel