[JBoss-user] may I expose CMR foreign key as a cmp-field?

2003-01-20 Thread Jon Finanger
Am i right when i say that the 32rc1 release only allows a fk to be apart of a pk but 
not allowing a cmr foreign key to also be a
cmp field?
Jboss4.0?

-Jon



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] may I expose CMR foreign key as a cmp-field?

2003-01-20 Thread Alex Loubyansky
Monday, January 20, 2003, 2:02:11 PM, you wrote:

JF Am i right when i say that the 32rc1 release only allows a fk to be apart of a pk 
but not allowing a cmr foreign key to also be a
JF cmp field?

yes

JF Jboss4.0?

not currently implemented but planned

alex




---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] may I expose CMR foreign key as a cmp-field?

2002-08-16 Thread Pavel Kolesnikov

Yes, I know it doesn't work because of duplicate columns in
generated SQL statements.

You say this is on the todo list for 4.0 - does it mean
it's correct (according to the specs) to have CMR and CMP
accessors for one column, but just current version of
JBoss doesn't support it?

Pavel

On Thu, 15 Aug 2002, Dain Sundstrom wrote:

 This doesn't work. You end up with sql statements that have duplicate 
 columns in them.  This is on the todo list for 4.0.
 
 -dain
 
 Pavel Kolesnikov wrote:
  Hello,
  
  in my application, I need to synchronize content of database
  tables on the central server with client application, which
  should be able to work offline.
  
  That's why I need a simple way, how to get values of foreign
  keys in dependent tables. But I also want to be able to use
  MR 2.0 accessors to manipulate data.
  
  My questions are:
  
  1, is this correct according to specs (I guess it doesn't say
 anything about it)?
  2, will it work in JBoss 3.0.1? (my EJB gets deployed, but
 if underlying tables don't exist, JBoss attemps to create
 them using duplacate column names).
  
  Example:
  
  if I used Gangster-Organization example from the User Guide,
  I'd need something like this:
  
public abstract class GangsterBean implements EntityBean {
  public abstract Integer getOrganizationId (); // CMP foreign key
  public abstract Organization getOrganization (); // CMR using 
// organizationId as a foreign key
}
  
  If I tried to deploy such class and let JBoss to create tables,
  JBoss would say:
  
org.jboss.deployment.DeploymentException: Error while creating table; - 
nested throwable: (java.sql.SQLException: Invalid argument value: 
Duplicate column name 'organizationId')
  
  If I told JBoss not to create tables, it would deploy may beans
  without complaining.
  
  I guess if my approach is correct, JBoss should be able to create
  tables correctly, and if my approach is wrong, JBoss shouldn't 
  never deploy such beans.
  
  Any ideas?
  
  Thanks,
  
  Pavel
  
  
  
  
  ---
  This sf.net email is sponsored by: Dice - The leading online job board
  for high-tech professionals. Search and apply for tech jobs today!
  http://seeker.dice.com/seeker.epl?rel_code=31
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] may I expose CMR foreign key as a cmp-field?

2002-08-16 Thread Dain Sundstrom

The spec doesn't say anything on mappings, so we can do what ever we 
want under the covers.

-dain

Pavel Kolesnikov wrote:
 Yes, I know it doesn't work because of duplicate columns in
 generated SQL statements.
 
 You say this is on the todo list for 4.0 - does it mean
 it's correct (according to the specs) to have CMR and CMP
 accessors for one column, but just current version of
 JBoss doesn't support it?
 
 Pavel
 
 On Thu, 15 Aug 2002, Dain Sundstrom wrote:
 
 
This doesn't work. You end up with sql statements that have duplicate 
columns in them.  This is on the todo list for 4.0.

-dain

Pavel Kolesnikov wrote:

Hello,

in my application, I need to synchronize content of database
tables on the central server with client application, which
should be able to work offline.

That's why I need a simple way, how to get values of foreign
keys in dependent tables. But I also want to be able to use
MR 2.0 accessors to manipulate data.

My questions are:

1, is this correct according to specs (I guess it doesn't say
   anything about it)?
2, will it work in JBoss 3.0.1? (my EJB gets deployed, but
   if underlying tables don't exist, JBoss attemps to create
   them using duplacate column names).

Example:

if I used Gangster-Organization example from the User Guide,
I'd need something like this:

  public abstract class GangsterBean implements EntityBean {
public abstract Integer getOrganizationId (); // CMP foreign key
public abstract Organization getOrganization (); // CMR using 
  // organizationId as a foreign key
  }

If I tried to deploy such class and let JBoss to create tables,
JBoss would say:

  org.jboss.deployment.DeploymentException: Error while creating table; - 
  nested throwable: (java.sql.SQLException: Invalid argument value: 
  Duplicate column name 'organizationId')

If I told JBoss not to create tables, it would deploy may beans
without complaining.

I guess if my approach is correct, JBoss should be able to create
tables correctly, and if my approach is wrong, JBoss shouldn't 
never deploy such beans.

Any ideas?

Thanks,

Pavel




---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



 
 
 
 ---
 This sf.net email is sponsored by: OSDN - Tired of that same old
 cell phone?  Get a new here for FREE!
 https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] may I expose CMR foreign key as a cmp-field?

2002-08-15 Thread Dain Sundstrom

This doesn't work. You end up with sql statements that have duplicate 
columns in them.  This is on the todo list for 4.0.

-dain

Pavel Kolesnikov wrote:
 Hello,
 
 in my application, I need to synchronize content of database
 tables on the central server with client application, which
 should be able to work offline.
 
 That's why I need a simple way, how to get values of foreign
 keys in dependent tables. But I also want to be able to use
 MR 2.0 accessors to manipulate data.
 
 My questions are:
 
 1, is this correct according to specs (I guess it doesn't say
anything about it)?
 2, will it work in JBoss 3.0.1? (my EJB gets deployed, but
if underlying tables don't exist, JBoss attemps to create
them using duplacate column names).
 
 Example:
 
 if I used Gangster-Organization example from the User Guide,
 I'd need something like this:
 
   public abstract class GangsterBean implements EntityBean {
 public abstract Integer getOrganizationId (); // CMP foreign key
 public abstract Organization getOrganization (); // CMR using 
   // organizationId as a foreign key
   }
 
 If I tried to deploy such class and let JBoss to create tables,
 JBoss would say:
 
   org.jboss.deployment.DeploymentException: Error while creating table; - 
   nested throwable: (java.sql.SQLException: Invalid argument value: 
   Duplicate column name 'organizationId')
 
 If I told JBoss not to create tables, it would deploy may beans
 without complaining.
 
 I guess if my approach is correct, JBoss should be able to create
 tables correctly, and if my approach is wrong, JBoss shouldn't 
 never deploy such beans.
 
 Any ideas?
 
 Thanks,
 
 Pavel
 
 
 
 
 ---
 This sf.net email is sponsored by: Dice - The leading online job board
 for high-tech professionals. Search and apply for tech jobs today!
 http://seeker.dice.com/seeker.epl?rel_code=31
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 

Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC




---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] may I expose CMR foreign key as a cmp-field?

2002-08-14 Thread Pavel Kolesnikov

Hello,

in my application, I need to synchronize content of database
tables on the central server with client application, which
should be able to work offline.

That's why I need a simple way, how to get values of foreign
keys in dependent tables. But I also want to be able to use
MR 2.0 accessors to manipulate data.

My questions are:

1, is this correct according to specs (I guess it doesn't say
   anything about it)?
2, will it work in JBoss 3.0.1? (my EJB gets deployed, but
   if underlying tables don't exist, JBoss attemps to create
   them using duplacate column names).

Example:

if I used Gangster-Organization example from the User Guide,
I'd need something like this:

  public abstract class GangsterBean implements EntityBean {
public abstract Integer getOrganizationId (); // CMP foreign key
public abstract Organization getOrganization (); // CMR using 
  // organizationId as a foreign key
  }

If I tried to deploy such class and let JBoss to create tables,
JBoss would say:

  org.jboss.deployment.DeploymentException: Error while creating table; - 
  nested throwable: (java.sql.SQLException: Invalid argument value: 
  Duplicate column name 'organizationId')

If I told JBoss not to create tables, it would deploy may beans
without complaining.

I guess if my approach is correct, JBoss should be able to create
tables correctly, and if my approach is wrong, JBoss shouldn't 
never deploy such beans.

Any ideas?

Thanks,

Pavel




---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user