Re: [Hibernate] Help, I implemented Criteria.count() and no one cares!!

2003-12-01 Thread Gavin King
Hi, I apologise.

Me not answering emails generally means I don't quite know what to say 
and am still thinking something through.

Anyway, as I've indicated elsewhere, I don't want this stuff in the 
Criteria API *yet*. We havn't decided how we should implement 
projection/aggregation yet, and when we do, it won't be by adding 1000 
methods like count(), avg(), max(), etc to the Criteria interface.

Anyone who really needs this _now_ can use your patch, I suppose.

peace

Gavin

Chris Nelson wrote:

Guys,

This is the 3rd time I have sent an email regarding
this, and I'm starting to wonder if I have virtual bad
breath or something ;)  I'm hoping maybe people
thought I was asking where is this method so I tried
to make my subject a little more explicit this time.  

I submitted a patch (2 of em actually) to add the
count() method to Criteria after seeing several posts
about not having it and needing it myself.  Is there a
chance someone can look at it and tell me if it's ok? 
It's HB-474, and the second attachment is the
corrected one (the first had an issue when used with
limit queries). 

Thanks in advance,

Chris Nelson



__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
--
Gavin King
JBoss Group
+61 410534454
http://hibernate.org


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] Mapping File Trouble

2003-12-01 Thread Neema, Devesh (MED, Contractor)

Hi Hibernate Users,

My database table structure is as follows

Table A
{
Composite key :- PatId
PaticipantId
}
Table B
{
Primary Key :- AdmissionId
and
Patid
ParticipantId
}

Table A have one to many relationship with Table B
Table B has many to one relationship with Table A

Doubt : How to represent in Mapping file ?
Please Respond me. 

Devesh  




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] hibernate xdoclet plugin & ehcache

2003-12-01 Thread khote
Is anybody working  on the hibernatedoclet, to add the ehcache features
somewhere?


Kevin



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Mapping File Trouble

2003-12-01 Thread Christian Bauer
On 01 Dec (20:31), Neema, Devesh (MED, Contractor) wrote:

>   Doubt : How to represent in Mapping file ?
>   Please Respond me. 

Please read the documentation, FAQs and ask on the User Forum if you
still have questions.

-- 
Christian Bauer
[EMAIL PROTECTED]


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Help, I implemented Criteria.count() and no one cares!!

2003-12-01 Thread Chris Nelson
Gavin,

Thanks for getting back to me.  I read an earlier post
where you had said something like this, but I was
hoping you might reconsider.  I agree that having
something even more generic would be better, but
having a count method now is absolutely critical to
anyone wanting to use the Criteria API and needing to
do paging.  I also feel that the other methods like
avg(), max(), etc, are not nearly as important as
count() for most people.  I certainly understand the
slippery slope idea, but I'm not sure it has to apply
here.  I would be willing to commit to refactoring,
removing, or doing whatever is needed to adapt this
method to fit in with the aggregation functionality
when it comes along.  I'd much rather do that than
have to redo this patch for each release of Hibernate
in the meanwhile.  I also think there are people who
may need this method who may be uncomfortable with
using a patched version of Hibernate.

Incidentally, I'd be happy to be involved in
developing the aggregation functionality if I can be
helpful.  It seems like making the Select statement
objectb available to sublasses might be a first step
in that direction anyways.  Of course, there seems to
be some talk about having Criteria generate HQL and
SQL with the new AST stuff (an idea which I rather
like if it's feasible), so maybe not.

Thanks again,

Chris Nelson

--- Gavin King <[EMAIL PROTECTED]> wrote:
> Hi, I apologise.
> 
> Me not answering emails generally means I don't
> quite know what to say 
> and am still thinking something through.
> 
> Anyway, as I've indicated elsewhere, I don't want
> this stuff in the 
> Criteria API *yet*. We havn't decided how we should
> implement 
> projection/aggregation yet, and when we do, it won't
> be by adding 1000 
> methods like count(), avg(), max(), etc to the
> Criteria interface.
> 
> Anyone who really needs this _now_ can use your
> patch, I suppose.
> 
> peace
> 
> Gavin
> 
> Chris Nelson wrote:
> 
> > Guys,
> > 
> > This is the 3rd time I have sent an email
> regarding
> > this, and I'm starting to wonder if I have virtual
> bad
> > breath or something ;)  I'm hoping maybe people
> > thought I was asking where is this method so I
> tried
> > to make my subject a little more explicit this
> time.  
> > 
> > I submitted a patch (2 of em actually) to add the
> > count() method to Criteria after seeing several
> posts
> > about not having it and needing it myself.  Is
> there a
> > chance someone can look at it and tell me if it's
> ok? 
> > It's HB-474, and the second attachment is the
> > corrected one (the first had an issue when used
> with
> > limit queries). 
> > 
> > Thanks in advance,
> > 
> > Chris Nelson
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > Free Pop-Up Blocker - Get it now
> > http://companion.yahoo.com/
> > 
> > 
> >
>
---
> > This SF.net email is sponsored by: SF.net Giveback
> Program.
> > Does SourceForge.net help you be more productive? 
> Does it
> > help you create better code?  SHARE THE LOVE, and
> help us help
> > YOU!  Click Here: http://sourceforge.net/donate/
> > ___
> > hibernate-devel mailing list
> > [EMAIL PROTECTED]
> >
>
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 
> -- 
> Gavin King
> JBoss Group
> +61 410534454
> http://hibernate.org
> 


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] hibernate xdoclet plugin & ehcache

2003-12-01 Thread Nick Heudecker
If nobody else steps up, I'm willing to take this on.  I've done some other
XDoclet hacking recently and it's not too bad.  However, I haven't touched
any of the XDoclet 2 stuff.

On Mon, Dec 01, 2003 at 07:06:26AM -0800, khote wrote:
> Is anybody working  on the hibernatedoclet, to add the ehcache features
> somewhere?
> 
> 
> Kevin
> 
> 
> 
> ---
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> ___
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel

-- 
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] Hibernate & Spring Javabean instantiation

2003-12-01 Thread Rob Butler
I have posted this to the Hibernate & Spring mailing lists as I think this will 
require the involvement of both development teams to answer.

Hibernate uses **javabean no-arg constructors** to instantiate objects and then uses 
javabean setters / getters when mapping from / to the database.

Spring uses javabean no-arg constructors to instantiate objects and then uses javabean 
setters to "configure" the objects.  Optionally, Spring can then call 
BeanFactoryAware.setBeanFactory for "Bean Factory Aware beans" and 
InitializingBean.afterPropertiesSet to inform the object it is fully configured if it 
has setup work to do.

This is all good, but what if I have an object that needs to be configured via spring, 
but needs to be persisted  via Hibernate?  Initially if I obtain the object from 
Spring via context.getBean("bean-name") the bean will have been instantiated and 
configured via Spring, and persisting the object via Hibernate should work fine.  
However, if I then retrieve the object from the DB via Hibernate the Spring bean 
factories are by-passed because Hibernte uses the javabean no-arg constructors 
directly, and not the spring bean factories.

This could be a problem if:

1) Some attributes of the javabean were not persisted in the DB, but should be loaded 
from the Spring config when the object is re-instantiated.  Business rules are the 
best example of this - Think of range limitations like a number must be between 5 and 
15 - then the business changes the rules and the number must now be between 3 and 15, 
or 8 and 15. 

This may also require the business rules to be re-checked after the object is loaded 
by Hibernate.  Does Hibernate support any "after load" method calls to the object so 
it can perform this kind of task?  Could one be added?  It would be possible to call 
an "after load" method from within the DAO code the app developer must write, but it 
would not be possible to have the app do this on collections if we are using 
Hibernates lazy load features.

2) The javabean needs to be "BeanFactoryAware" and have the setBeanFactory method 
called.
3) The javabean relies on having the spring InitializingBean.afterPropertiesSet method 
called.


Both #2 and #3 should happen BEFORE any "after load" Hibernate method call, because 
those resources may be needed during the Hibernate call.

I think that adding support for this use case will probably require changes to 
Hibernate for it to support not only the javabean no-arg constructor, but also the 
spring bean factory method of object instantiation.  Better yet, to be more generic 
Hibernate should support the use of user defined "factory" methods.  Then Spring 
should provide a "Hibernate factory" that Hibernate could use to load any object from 
the Spring bean factory.  Providing this capability along with the Hibernate "after 
load" method call would allow for better "Idiomatic" java persistence.

Another option may be for Spring to have some sort of a way for a javabean no-arg 
constructor to call a "configure me" method.  I.E. the no-arg constructor could have 
code within it that calls Spring, and Spring configures the object using javabean 
setters, calls BeanFactoryAware.setBeanFactory and InitializingBean.afterPropertiesSet 
(if appropriate).  This is probably not a good option as it would be impossible to 
have two instances of the object that are configured differently.  Also, it's probably 
not possible / easy to do.

Or did I completely miss something and this already possible?
Thoughts?

Later
Rob



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Help, I implemented Criteria.count() and no one cares!!

2003-12-01 Thread David Morris
In general it is best to avoid paging if at all possible but if you
can't avoid it don't forget that different databases have different ways
of implementing a count. With Oracle you would use rownum if possible
and with DB2 you would add fetch first n rows only.

David Morris

>>> Chris Nelson <[EMAIL PROTECTED]> 12/1/2003 8:31:09 AM >>>
Gavin,

Thanks for getting back to me.  I read an earlier post
where you had said something like this, but I was
hoping you might reconsider.  I agree that having
something even more generic would be better, but
having a count method now is absolutely critical to
anyone wanting to use the Criteria API and needing to
do paging.  I also feel that the other methods like
avg(), max(), etc, are not nearly as important as
count() for most people.  I certainly understand the
slippery slope idea, but I'm not sure it has to apply
here.  I would be willing to commit to refactoring,
removing, or doing whatever is needed to adapt this
method to fit in with the aggregation functionality
when it comes along.  I'd much rather do that than
have to redo this patch for each release of Hibernate
in the meanwhile.  I also think there are people who
may need this method who may be uncomfortable with
using a patched version of Hibernate.

Incidentally, I'd be happy to be involved in
developing the aggregation functionality if I can be
helpful.  It seems like making the Select statement
objectb available to sublasses might be a first step
in that direction anyways.  Of course, there seems to
be some talk about having Criteria generate HQL and
SQL with the new AST stuff (an idea which I rather
like if it's feasible), so maybe not.

Thanks again,

Chris Nelson


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Help, I implemented Criteria.count() and no one cares!!

2003-12-01 Thread Max Rydahl Andersen
Yes - and Hibernate honors those differences as much as possible.

/max

David Morris wrote:

In general it is best to avoid paging if at all possible but if you
can't avoid it don't forget that different databases have different ways
of implementing a count. With Oracle you would use rownum if possible
and with DB2 you would add fetch first n rows only.
David Morris


Chris Nelson <[EMAIL PROTECTED]> 12/1/2003 8:31:09 AM >>>
Gavin,

Thanks for getting back to me.  I read an earlier post
where you had said something like this, but I was
hoping you might reconsider.  I agree that having
something even more generic would be better, but
having a count method now is absolutely critical to
anyone wanting to use the Criteria API and needing to
do paging.  I also feel that the other methods like
avg(), max(), etc, are not nearly as important as
count() for most people.  I certainly understand the
slippery slope idea, but I'm not sure it has to apply
here.  I would be willing to commit to refactoring,
removing, or doing whatever is needed to adapt this
method to fit in with the aggregation functionality
when it comes along.  I'd much rather do that than
have to redo this patch for each release of Hibernate
in the meanwhile.  I also think there are people who
may need this method who may be uncomfortable with
using a patched version of Hibernate.
Incidentally, I'd be happy to be involved in
developing the aggregation functionality if I can be
helpful.  It seems like making the Select statement
objectb available to sublasses might be a first step
in that direction anyways.  Of course, there seems to
be some talk about having Criteria generate HQL and
SQL with the new AST stuff (an idea which I rather
like if it's feasible), so maybe not.
Thanks again,

Chris Nelson

---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Hibernate & Spring Javabean instantiation

2003-12-01 Thread Max Rydahl Andersen
Hi Rob,

Have you taken a look at Interceptor.instantiate(Class clazz, Serializable id) ?

With that you can do whatever you want regarding construction of objects ;)

/max

Rob Butler wrote:

I have posted this to the Hibernate & Spring mailing lists as I think this will require the involvement of both development teams to answer.

Hibernate uses **javabean no-arg constructors** to instantiate objects and then uses javabean setters / getters when mapping from / to the database.

Spring uses javabean no-arg constructors to instantiate objects and then uses javabean setters to "configure" the objects.  Optionally, Spring can then call BeanFactoryAware.setBeanFactory for "Bean Factory Aware beans" and InitializingBean.afterPropertiesSet to inform the object it is fully configured if it has setup work to do.

This is all good, but what if I have an object that needs to be configured via spring, but needs to be persisted  via Hibernate?  

Initially if I obtain the object from Spring via context.getBean("bean-name") the bean will have been instantiated and configured via Spring, 
> nd persisting the object via Hibernate should work fine.  However, if I then retrieve the object from the DB via Hibernate the Spring bean factories are

by-passed because Hibernte uses the javabean no-arg constructors directly, and not the spring bean factories.

This could be a problem if:

1) Some attributes of the javabean were not persisted in the DB, but should be loaded from the Spring config when the object is re-instantiated.  Business rules are the best example of this - Think of range limitations like a number must be between 5 and 15 - then the business changes the rules and the number must now be between 3 and 15, or 8 and 15. 

This may also require the business rules to be re-checked after the object is loaded by Hibernate.  Does Hibernate support any "after load" method calls to the object so it can perform this kind of task?  Could one be added?  It would be possible to call an "after load" method from within the DAO code the app developer must write, but it would not be possible to have the app do this on collections if we are using Hibernates lazy load features.

2) The javabean needs to be "BeanFactoryAware" and have the setBeanFactory method 
called.
3) The javabean relies on having the spring InitializingBean.afterPropertiesSet method 
called.
Both #2 and #3 should happen BEFORE any "after load" Hibernate method call, because those resources may be needed during the Hibernate call.

I think that adding support for this use case will probably require changes to Hibernate for it to support not only the javabean no-arg constructor, but also the spring bean factory method of object instantiation.  Better yet, to be more generic Hibernate should support the use of user defined "factory" methods.  Then Spring should provide a "Hibernate factory" that Hibernate could use to load any object from the Spring bean factory.  Providing this capability along with the Hibernate "after load" method call would allow for better "Idiomatic" java persistence.

Another option may be for Spring to have some sort of a way for a javabean no-arg constructor to call a "configure me" method.  I.E. the no-arg constructor could have code within it that calls Spring, and Spring configures the object using javabean setters, calls BeanFactoryAware.setBeanFactory and InitializingBean.afterPropertiesSet (if appropriate).  This is probably not a good option as it would be impossible to have two instances of the object that are configured differently.  Also, it's probably not possible / easy to do.

Or did I completely miss something and this already possible?
Thoughts?
Later
Rob


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] hibernate, spring?

2003-12-01 Thread khote
I'm having spring load a LocalSessionFactoryBean from a spring context file.
I upgraded my hibernate to 2.1 last night, now all is lost  uh, yeah.

How do I turn off the ehcache completely, totally, and without pity?

   [junit] [INFO] Configuration - -instantiating and configuring caches
   [junit] -  ---
   [junit]
   [junit] Testcase: testHibernateService took 3.015 sec
   [junit] Caused an ERROR
   [junit] null
   [junit] java.lang.IllegalAccessError
   [junit] at
net.sf.cglib.core.ClassEmitter.setTarget(ClassEmitter.java:87)
   [junit] at
net.sf.cglib.core.ClassEmitter.(ClassEmitter.java:79)
   [junit] at
net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:197)
   [junit] at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:
186)
   [junit] at
net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:177)
   [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:149)
   [junit] at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:142)
   [junit] at
net.sf.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:22
9)
   [junit] at
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:72
0)
   [junit] at
org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(
LocalSessionFactoryBean.java:292)
   [junit] at
org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet
(LocalSessionFactoryBean.java:246)
   [junit] at
org.springframework.beans.factory.support.AbstractBeanFactory.callLifecycleM
ethodsIfNecessary(AbstractBeanFactory.java:964)
   [junit] at
org.springframework.beans.factory.support.AbstractBeanFactory.createBean(Abs
tractBeanFactory.java:537)
   [junit] at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:211)
   [junit] at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:221)
   [junit] at
TestHibernateService.testHibernateService(TestHibernateService.java:54)
   [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
   [junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
   [junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
   [junit]
   [junit] Testcase: testHibernateService

Kevin



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Hibernate & Spring Javabean instantiation

2003-12-01 Thread Rob Butler

> Have you taken a look at Interceptor.instantiate(Class clazz, Serializable id) ?
> 
> With that you can do whatever you want regarding construction of objects ;)
> 

Cool, exactly what I was looking for!  That along with Hibernate's Lifecycle interface 
will do everything I was asking for in my original message.  The only thing that isn't 
provided is a default spring interceptor implementation, although building one 
shouldn't be hard.

Thanks Max. & Way to go Hibernate!

Later
Rob



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] Hibernate & Spring Javabean instantiation

2003-12-01 Thread Max Rydahl Andersen
You are always welcome to post your SpringBeanFactoryInterceptor on our Wiki ;)

/max

Rob Butler wrote:

Have you taken a look at Interceptor.instantiate(Class clazz, Serializable id) ?

With that you can do whatever you want regarding construction of objects ;)



Cool, exactly what I was looking for!  That along with Hibernate's Lifecycle interface will do everything I was asking for in my original message.  The only thing that isn't provided is a default spring interceptor implementation, although building one shouldn't be hard.

Thanks Max. & Way to go Hibernate!

Later
Rob


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] Composite Id one-to-one relationship

2003-12-01 Thread Neema, Devesh (MED, Contractor)

Hi Hibernate Users,

I have a tables  with following Structure :

Table A :- Composite ID 1. PatId:-  many-to-one 
relationship with Table C
2.ParticipantId  :-  many-to-one 
relationship with Table D

Table B :- Composite ID 1.PatId
2.ParticipantId


Table A and Table B are one-to-one

I have represented this in HBM file 













 



Is this correct way to represent the relationship ?

Devesh




---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel