Re: [JBoss-user] one to one/none relationship

2002-05-13 Thread Dain Sundstrom

Dennis Muhlestein wrote:

> I have a situation where an account can have one or none of an another
> entity bean in a relationship.
> 
> I've defined it below as a one-one relationship.  This works fine if the
> billingInfo exists, but if it doesn't and I call getBillingInfo from the
> account, I still get an EntityBean Interface back.  (No Exception
> occurs)  Then, when I try to access or set something on the billingInfo
> interface, I get NoSuchEntityException from jboss.


That is a bug. Pleas post a report at SourceForge along with a simple 
test case.

 
> Should I use one-many instead??  


No.

> Shouldn't I get null back or something
> instead of an interface to the ejb when the billingInfo doesn't yet
> exists?  


Null.

> If this is the correct functionality, then how to I know if a
> billing info record exists or not yet?  Is it possible to remove the
> billingInfo record in this case or is that against the law in a one-one
> relationship?


It is a bug

 

-- 
x
Dain Sundstrom
Chief Architect, JBossCMP
JBoss Group, LLC
x



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: Re[2]: [JBoss-user] one to one/none relationship

2002-05-07 Thread Dennis Muhlestein

Thanks for the reply Alex,

That's what I thought.  I found a bug on sourceforge where someone else
reported this behaviour but under the comments it said it had been
fixed.

When I call MyObject.getItem(..) I don't get null back, I get an object
and then the NoSuchEntityException is thrown.

Has anyone experienced this same thing?  Is there a fix/patch for it?

-Dennis


On Tue, 2002-05-07 at 00:28, Alex Loubyansky wrote:
> Hello Dennis,
> 
> Monday, May 06, 2002, 11:34:07 PM, you wrote:
> 
> If the cmr field isn't set, you should get null as a result of get
> method invocation.
> 
> DM> This is concerning JBoss-3.0 on Branch_3_0 latest CVS
> DM> linux/jdk1.3.1
> 
> DM> On Mon, 2002-05-06 at 14:10, Dennis Muhlestein wrote:
> >> I have a situation where an account can have one or none of an another
> >> entity bean in a relationship.
> >> 
> >> I've defined it below as a one-one relationship.  This works fine if the
> >> billingInfo exists, but if it doesn't and I call getBillingInfo from the
> >> account, I still get an EntityBean Interface back.  (No Exception
> >> occurs)  Then, when I try to access or set something on the billingInfo
> >> interface, I get NoSuchEntityException from jboss.
> >> 
> >> Should I use one-many instead??  Shouldn't I get null back or something
> >> instead of an interface to the ejb when the billingInfo doesn't yet
> >> exists?  If this is the correct functionality, then how to I know if a
> >> billing info record exists or not yet?  Is it possible to remove the
> >> billingInfo record in this case or is that against the law in a one-one
> >> relationship?
> >> 
> >> Thanks for any comments.
> >> Dennis
> >> 
> >> 
> >> One Account has One/None
> >> BillingInfo
> >> Account-BillingInfo
> >> 
> >>
> >> AccountToBillingRole
> >> One
> >>
> >> 
>AccountEJB  
>  
> >> 
> >> billingInfo
> >> 
> >> 
> >> 
> >>
> >> BillingToAccountRole
> >> One
> >> 
> >> BillingInfoEJB
> >> 
> >> 
> >> 
> 
> -- 
> Best regards,
>  Alexmailto:[EMAIL PROTECTED]
> 
> 
> 
> ___
> 
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 




signature.asc
Description: This is a digitally signed message part


Re[2]: [JBoss-user] one to one/none relationship

2002-05-06 Thread Alex Loubyansky

Hello Dennis,

Monday, May 06, 2002, 11:34:07 PM, you wrote:

If the cmr field isn't set, you should get null as a result of get
method invocation.

DM> This is concerning JBoss-3.0 on Branch_3_0 latest CVS
DM> linux/jdk1.3.1

DM> On Mon, 2002-05-06 at 14:10, Dennis Muhlestein wrote:
>> I have a situation where an account can have one or none of an another
>> entity bean in a relationship.
>> 
>> I've defined it below as a one-one relationship.  This works fine if the
>> billingInfo exists, but if it doesn't and I call getBillingInfo from the
>> account, I still get an EntityBean Interface back.  (No Exception
>> occurs)  Then, when I try to access or set something on the billingInfo
>> interface, I get NoSuchEntityException from jboss.
>> 
>> Should I use one-many instead??  Shouldn't I get null back or something
>> instead of an interface to the ejb when the billingInfo doesn't yet
>> exists?  If this is the correct functionality, then how to I know if a
>> billing info record exists or not yet?  Is it possible to remove the
>> billingInfo record in this case or is that against the law in a one-one
>> relationship?
>> 
>> Thanks for any comments.
>> Dennis
>> 
>> 
>> One Account has One/None
>> BillingInfo
>> Account-BillingInfo
>> 
>>
>> AccountToBillingRole
>> One
>>
>> 
>AccountEJB  
>  
>> 
>> billingInfo
>> 
>> 
>> 
>>
>> BillingToAccountRole
>> One
>> 
>> BillingInfoEJB
>> 
>> 
>> 

-- 
Best regards,
 Alexmailto:[EMAIL PROTECTED]



___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] one to one/none relationship

2002-05-06 Thread Dennis Muhlestein

This is concerning JBoss-3.0 on Branch_3_0 latest CVS
linux/jdk1.3.1

On Mon, 2002-05-06 at 14:10, Dennis Muhlestein wrote:
> I have a situation where an account can have one or none of an another
> entity bean in a relationship.
> 
> I've defined it below as a one-one relationship.  This works fine if the
> billingInfo exists, but if it doesn't and I call getBillingInfo from the
> account, I still get an EntityBean Interface back.  (No Exception
> occurs)  Then, when I try to access or set something on the billingInfo
> interface, I get NoSuchEntityException from jboss.
> 
> Should I use one-many instead??  Shouldn't I get null back or something
> instead of an interface to the ejb when the billingInfo doesn't yet
> exists?  If this is the correct functionality, then how to I know if a
> billing info record exists or not yet?  Is it possible to remove the
> billingInfo record in this case or is that against the law in a one-one
> relationship?
> 
> Thanks for any comments.
> Dennis
> 
> 
> One Account has One/None
> BillingInfo
> Account-BillingInfo
> 
>
> AccountToBillingRole
> One
>
> AccountEJB 
>   
> 
> billingInfo
> 
> 
> 
>
> BillingToAccountRole
> One
> 
> BillingInfoEJB
> 
> 
> 
> 
> 
> 
> 




signature.asc
Description: This is a digitally signed message part


[JBoss-user] one to one/none relationship

2002-05-06 Thread Dennis Muhlestein

I have a situation where an account can have one or none of an another
entity bean in a relationship.

I've defined it below as a one-one relationship.  This works fine if the
billingInfo exists, but if it doesn't and I call getBillingInfo from the
account, I still get an EntityBean Interface back.  (No Exception
occurs)  Then, when I try to access or set something on the billingInfo
interface, I get NoSuchEntityException from jboss.

Should I use one-many instead??  Shouldn't I get null back or something
instead of an interface to the ejb when the billingInfo doesn't yet
exists?  If this is the correct functionality, then how to I know if a
billing info record exists or not yet?  Is it possible to remove the
billingInfo record in this case or is that against the law in a one-one
relationship?

Thanks for any comments.
Dennis


One Account has One/None
BillingInfo
Account-BillingInfo

   
AccountToBillingRole
One
   
AccountEJB   
 

billingInfo



   
BillingToAccountRole
One

BillingInfoEJB










signature.asc
Description: This is a digitally signed message part