[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships

2004-07-05 Thread lmpc
O i can't believe it! It's a stupid error! 

I have:


  |defaults
  | datasourcejava:/mySqlDS/datasource
  | datasource-mappingmySQL/datasource-mapping
  | preferred-relation-mappingforeign-key/preferred-relation-mapping
  | create-tablefalse/create-table
  | remove-tablefalse/remove-table
  | /defaults
  | 


and my datasource is MySqlDS.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3840956#3840956

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3840956


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships

2004-07-05 Thread lmpc
I can find the DataSource on the java namespace...

anonymous wrote : 
  | JMX MBean Operation Result
  | 
  | .
  | .
  | .
  | 
  | 
  | java: Namespace
  |   +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
  |   +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
  |   +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
  |   +- DefaultJMSProvider (class: org.jboss.jms.jndi.JBossMQProvider)
  |   +- MySqlDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
  |   +- comp (class: javax.naming.Context)
  |   +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
  |   +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
  |   +- jaas (class: javax.naming.Context)
  |   |   +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
  |   |   +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
  |   |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
  |   +- timedCacheFactory (class: javax.naming.Context)
  | Failed to lookup: timedCacheFactory, errmsg=null
  |   +- TransactionPropagationContextExporter (class: 
org.jboss.tm.TransactionPropagationContextFactory)
  |   +- Mail (class: javax.mail.Session)
  |   +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
  |   +- TransactionPropagationContextImporter (class: 
org.jboss.tm.TransactionPropagationContextImporter)
  |   +- TransactionManager (class: org.jboss.tm.TxManager)
  | 
  | .
  | .
  | .
  | 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3840953#3840953

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3840953


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships

2004-07-03 Thread loubyansky
The datasource is not available. Make sure it is deployed successfully and you can see 
it in JNDIView.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3840846#3840846

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3840846


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships

2004-07-02 Thread kabkhan
Post deployment descriptors etc.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3840771#3840771

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3840771


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships

2004-07-02 Thread lmpc
Sorry.

Here are the deployment descriptors

ejb-jar
  | enterprise-beans
  | .
  | .
  | .
  | /enterprise-beans
  | relationships
  | ejb-relation
  | ejb-relation-nameperson-card/ejb-relation-name
  | ejb-relationship-role
  | descriptionperson/description
  | ejb-relationship-role-namePersonRole/ejb-relationship-role-name
  | multiplicityOne/multiplicity
  | relationship-role-source
  | descriptionperson/description
  | ejb-namePerson/ejb-name
  | /relationship-role-source
  | cmr-field
  | descriptioncard/description
  | cmr-field-namecard/cmr-field-name
  | cmr-field-typejava.util.Collection/cmr-field-type
  | /cmr-field
  | /ejb-relationship-role
  | ejb-relationship-role
  | descriptioncard/description
  | ejb-relationship-role-nameCardRole/ejb-relationship-role-name
  | multiplicityMany/multiplicity
  | cascade-delete /
  | relationship-role-source
  | descriptioncard/description
  | ejb-nameCard/ejb-name
  | /relationship-role-source
  | /ejb-relationship-role
  | /ejb-relation
  | /relationships
  | /ejb-jar
  | 
  | 
  | 
  | 
  | jbosscmp-jdbc
  | defaults
  | datasourcejava:/mySqlDS/datasource
  | datasource-mappingmySQL/datasource-mapping
  | preferred-relation-mappingforeign-key/preferred-relation-mapping
  | create-tablefalse/create-table
  | remove-tablefalse/remove-table
  | /defaults
  | enterprise-beans
  | .
  | .
  | .
  | /enterprise-beans
  | relationships
  | ejb-relation
  | ejb-relation-nameperson-card/ejb-relation-name
  | foreign-key-mapping /
  | ejb-relationship-role
  | ejb-relationship-role-namePersonRole/ejb-relationship-role-name
  | /ejb-relationship-role
  | ejb-relationship-role
  | ejb-relationship-role-nameCardRole/ejb-relationship-role-name
  | /ejb-relationship-role
  | /ejb-relation
  | /relationships
  | /jbosscmp-jdbc

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3840773#3840773

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3840773


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-11 Thread mpforste
Now I am getting this errror when trying to call the create function, 

13:44:41,220 ERROR [LogInterceptor] EJBException, causedBy:
java.lang.ClassCastException
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceV
alue(JDBCCMRFieldBridge.java:773)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDB
CCMRFieldBridge.java:624)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke
(EntityBridgeInvocationHandler.java:121)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at com.ingotz.points.core.entity.TransactionBean$Proxy.setTr_type(gener
ated)
at com.ingotz.points.core.entity.TransactionBean.ejbPostCreate(Unknown S
ource)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersi
stenceManager.java:240)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.post
CreateEntity(CachedConnectionInterceptor.java:277)
at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:725
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityConta

The line that causes the problem is as follows (in a JSP file) 

Transaction tranMan = tran.create(new Date(),new Integer(1),new 
Boolean(false), new Boolean(false),transtype); 


The TransactionHome Create function is as follows
  public Transaction create( Date tr_date, Integer tr_state, Boolean tr_summary, 
Boolean tr_non_refundable, TransType tr_type ) throws RemoteException, CreateException;

The ejbcreate code is as follows

  public Long ejbCreate( Date tr_date, Integer tr_state, Boolean tr_summary, 
Boolean tr_non_refundable, TransType tr_type)
throws CreateException
  {
setTr_date(tr_date);
setTr_state(tr_state);
setTr_summary(tr_summary);
setTr_non_refundable(tr_non_refundable);
return null;
  }

  public void ejbPostCreate(Date tr_date, Integer tr_state, Boolean 
tr_summary, Boolean tr_non_refundable, TransType tr_type )
throws CreateException
  {
setTr_type(tr_type);
  }



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830114#3830114

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830114


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-11 Thread warmachine
I'm working with mpforste on this problem.  Only having tr_type (the foreign key) as a 
cmr-field means when JBoss creates the table in mySQL, the foreign key field is a 
BLOB.  The foreign key is supposed to be a BIGINT and creating transactions fails when 
it is a BIGINT.

When I leave it as a BLOB, code works as I expected, including creating a transaction 
with a transtype object, retrieving an associated transtype from a transaction and 
setting its description, which appears in the transtype table.  In other words, we 
have CMR but using an object reference, not a foreign key field.

Surely this can't be JBoss's method of persisting relationships?  It can't be made to 
use a relational model or have I misconfigured something?  I would prefer to use a 
relational persistence scheme so other reporting tools can read the database.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830119#3830119

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830119


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-11 Thread sesques
I agree with you warmachine, I just don't use myself database created by JBoss, but 
with a standard modeling tool from Sybase, so I don't experiment this problem. As you 
says, it is not a good way to lets Jboss create foreign keys itself with a standard 
relationship persistance method. So there is no restriction to declare the foreign key 
as an additional CMP field. Just do not use the same field name.

Concerning the error, TransType is the remote class. For CMR fields, you must use the 
local interface, not the remote.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830131#3830131

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830131


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-10 Thread mpforste
I changed the code to have a setTransType() which takes the TransType class as a 
parameter,  and I changed the CMR field to be TransType, 

I now get this error 

javax.ejb.CreateException: Could not create entity:java.sql.SQLException: Column not 
found message from server: Unknown column 'TransType' in 'field list'
Could not create entity:java.sql.SQLException: Column not found message from server: 
Unknown column 'TransType' in 'field list'
Could not create entity:java.sql.SQLException: Column not found message from server: 
Unknown column 'TransType' in 'field list'

How do you get the fields linking properly?


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830042#3830042

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830042


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-10 Thread sesques
1) Database auto-increment : You don't experiment this yet because as you says, the 
TransTypes are predefined (so you do not create records in this table) but the 
transaction table have the same problem. As I understand, you don't suuceed to create 
a new transaction record. But if you says that it works anyway for you, it's OK for me.

2) CMR field not CMP : This is correct. You don't have to create the CMP field 
tr_type. The CMR field is sufficient. Then you can set it in ejbPostCreate passing the 
TransType class. In addition, in your case, naming both the CMP and the CMR can occurs 
in a conflict for the getters and the setters.

3) If you experiment a cannot insert null value or explict value for the primary 
key creating your Transation record, remember that database auto-incrementted keys are 
handling through unknown-pk, without declaring teh CMP field for the primary key id.

Pascal



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830043#3830043

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830043


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-10 Thread sesques
Do you change your jbosscmp-jdbc.xml ?
The mapping is done in this file.
It should be set to


ejb-relation
ejb-relation-nameType-Transaction/ejb-relation-name
foreign-key-mapping /
ejb-relationship-role
ejb-relationship-role-nameTransTypeBeanEnd/ejb-relationship-role-name
key-fields
key-field
field-nameTransType/field-name 
column-nametr_type/column-name 
/key-field
/key-fields
/ejb-relationship-role
ejb-relationship-role
ejb-relationship-role-nameTransactionBeanEnd/ejb-relationship-role-name
key-fields/
/ejb-relationship-role
/ejb-relation



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830059#3830059

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830059


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-10 Thread sesques
Sorry, I made a mistake in the previous jbosscmp-jdbc.xml:
It shoul be:


  | relationships
  | ejb-relation
  | ejb-relation-nameType-Transaction/ejb-relation-name
  | foreign-key-mapping /
  | ejb-relationship-role
  | ejb-relationship-role-nameTransTypeBeanEnd/ejb-relationship-role-name
  | key-fields
  | key-field
  | field-nameid/field-name
  | column-nametr_type/column-name
  | /key-field
  | /key-fields
  | /ejb-relationship-role
  | ejb-relationship-role
  | ejb-relationship-role-nameTransactionBeanEnd/ejb-relationship-role-name
  | key-fields/
  | /ejb-relationship-role
  | /ejb-relation
  | /relationships
  | 


and ejb-jar.xml :

  |entity
  |   ejb-nameTransTypeBean/ejb-name
  |   homecom.ingotz.entity.TransTypeHome/home
  |   remotecom.ingotz.entity.TransType/remote
  |   local-homecom.ingotz.entity.TransTypeLocalHome/local-home
  |   localcom.ingotz.entity.TransTypeLocal/local
  |   ejb-classcom.ingotz.entity.TransTypeBean/ejb-class
  |   persistence-typeContainer/persistence-type
  |   prim-key-classjava.lang.Long/prim-key-class
  |   reentrantFalse/reentrant
  |   cmp-field
  | field-nameId/field-name
  |   /cmp-field
  |cmp-field
  | field-nameDescription/field-name
  |/cmp-field
  |primkey-fieldId/primkey-field
  |   cmp-version2.x/cmp-version 
  |   abstract-schema-nameTransTypeBeanAPS/abstract-schema-name
  | 
  |   resource-ref
  | res-ref-namejdbc/mysql/res-ref-name
  | res-typejavax.sql.DataSource/res-type
  | res-authContainer/res-auth
  |   /resource-ref
  | /entity
  | 
  | entity
  |   ejb-nameTransactionBean/ejb-name
  |   homecom.ingotz.entity.TransactionHome/home
  |   remotecom.ingotz.entity.Transaction/remote
  |   local-homecom.ingotz.entity.TransactionLocalHome/local-home
  |   localcom.ingotz.entity.TransactionLocal/local
  |   ejb-classcom.ingotz.entity.TransactionBean/ejb-class
  |   persistence-typeContainer/persistence-type
  |   prim-key-classjava.lang.Long/prim-key-class
  |   reentrantFalse/reentrant
  |   cmp-fieldfield-nameid/field-name/cmp-field
  |   cmp-fieldfield-nametr_date/field-name/cmp-field
  |   cmp-fieldfield-nametr_state/field-name/cmp-field
  |   cmp-fieldfield-nametr_summary/field-name/cmp-field
  |   cmp-fieldfield-nametr_non_refundable/field-name/cmp-field
  |   primkey-fieldid/primkey-field
  |   cmp-version2.x/cmp-version 
  |   abstract-schema-nameTransactionBeanAPS/abstract-schema-name
  | 
  |   resource-ref
  | res-ref-namejdbc/mysql/res-ref-name
  | res-typejavax.sql.DataSource/res-type
  | res-authContainer/res-auth
  |   /resource-ref
  | /entity
  | 
  | 
  |   /enterprise-beans
  |   
  |   relationships
  |ejb-relation
  | ejb-relation-nameType-Transaction/ejb-relation-name
  | ejb-relationship-role
  | ejb-relationship-role-nameTransTypeBeanEnd/ejb-relationship-role-name  
 
  | multiplicityOne/multiplicity
  | relationship-role-source
  | ejb-nameTransTypeBean/ejb-name
  | /relationship-role-source
  | /ejb-relationship-role
  | ejb-relationship-role
  | ejb-relationship-role-nameTransactionBeanEnd/ejb-relationship-role-name
  | multiplicityMany/multiplicity
  | relationship-role-source
  | ejb-nameTransactionBean/ejb-name
  | /relationship-role-source
  | cmr-field
  | cmr-field-nametr_type/cmr-field-name
  | /cmr-field
  | /ejb-relationship-role
  | /ejb-relation
  | /relationships
  | 

Then it should work. If not, post your code.
Sorry for the mistake.


View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830066#3830066

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830066


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-09 Thread sesques
Hi,

Can you post the exact error log you have because I don't really understand your 
problem:

1 : If your tables must have the primary key auto incremented by the database, you 
must declared an unknown-pk tag for each table
2 : The CMR fields (the foreign key) must be set in ejbPostCreate, not in ejbCreate, 
and you set the CMR field not the foreign CMP field
3 : JBoss is buggeg with database auto-incremented key. So you must set the CMP field 
tr_type in ejbCreate with setTr_type(tr_type.getId()), the sets the CMR field tr_type 
in ejbPostCreate.

In your description (ejb-jar and jbosscmp-jdbc), you are not in database 
auto-incremented configuration. If this is right, you can delete the CMP field 
tr_type, you don't need it. Just work with the CMR field.
Also, in your case, you should experiment problems naming the CMP and CMR field 
tr_type and Tr_Type because the getters will have the same name getTr_type();





View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830011#3830011

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830011


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-09 Thread mpforste
The Database is being created with AutoIncrement, but The issue we have is not exactly 
that, the fields id are auto_increment but we are not going to be creating records 
using the relationship (in this case) with the related field having to create an 
autoincrement, We have several Predefined TransTypes, that each transaction can refer 
to one of them. We would do a find to get the transtype and pass it into the 
transaction create function - So you are saying that we pass the Class in anyway but 
the setTr_type function that we use is in the postcreate not the ejbcreate function 
for it to process the class correctly. and please enlighten me - the cmr field is the 
field in the table that is the FK, and that field doesn't have to be declared as a CMP 
field either as it is processed in the postcreate The errors we have been having 
are varied from Cant find tr_type to cant have 2 primary keys -  We tried the using 
the unknown pk for the autoincrement at first but somehow we have it working correctly 
here anyway
but we need to enforce the field tr_type as a bigint not a blob as we need to just 
store the reference - 
If we are doing that will it work automatically or not - are there any easy to 
understand tutorials that cover the system we are using? 

Mike.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3830015#3830015

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830015


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user