Discussion:
[Middlegen-user] bug in 1-to-many relationship
Kasper Nielsen
2002-09-26 17:16:20 UTC
Permalink
Having problems with the EJBBeans middlegen created I took a look at
entity-cmp-20.vm

shouldn't it be ( _!_$plugin.fkcmp)

#if((!$column.fk || !$plugin.fkcmp))

instead of

#if((!$column.fk || $plugin.fkcmp))

/**

* Returns the $column.variableName

* @todo support OracleClob,OracleBlob on WLS

*

* @return the $column.variableName

*

#if($column.pk)

* @ejb.pk-field

#end



- Kasper
a***@netcom.no
2002-09-26 17:21:01 UTC
Permalink
If you explain the symptom of your problem, I might get a clue about
what the bug is :-)

What's wrong?

Aslak

----- Original Message -----
From: "Kasper Nielsen" <***@kav.dk>
Date: Thursday, September 26, 2002 7:56 pm
Subject: [Middlegen-user] bug in 1-to-many relationship
Post by Kasper Nielsen
Having problems with the EJBBeans middlegen created I took a look at
entity-cmp-20.vm
shouldn't it be ( _!_$plugin.fkcmp)
#if((!$column.fk || !$plugin.fkcmp))
instead of
#if((!$column.fk || $plugin.fkcmp))
/**
* Returns the $column.variableName
*
*
#if($column.pk)
#end
- Kasper
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Kasper Nielsen
2002-09-26 17:37:04 UTC
Permalink
Sure.

If i have a 1-to-many relationship 1 User {user_id,name} to many
Reservation{reservation_id, user_id}

Im seeing both a String: getUserId and a UserLocal: getUser in the generated
ReservationBean.
Is this the intended behaviour??

however when jboss tries to create a new Reservation i get a duplicate key
exception because it tries something like
create Reservation(reservation_id, user_id, user_id) value (?, ?, ?)

perhaps its a Sapdb specific problem not accepting the same column twice in
a create statement.


- Kasper

----- Original Message -----
From: "Kasper Nielsen" <***@kav.dk>
To: <middlegen-***@lists.sourceforge.net>
Sent: Thursday, September 26, 2002 8:56 PM
Subject: [Middlegen-user] bug in 1-to-many relationship
Post by Kasper Nielsen
Having problems with the EJBBeans middlegen created I took a look at
entity-cmp-20.vm
shouldn't it be ( _!_$plugin.fkcmp)
#if((!$column.fk || !$plugin.fkcmp))
instead of
#if((!$column.fk || $plugin.fkcmp))
/**
* Returns the $column.variableName
*
*
#if($column.pk)
#end
- Kasper
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...