Hello,
How do you get a reference to your primary key using your method below?
"sesques" wrote : Normally, this should work and is compliant wth the EJB spec.
| (But if not, keep your version as well, it will be a software mystery ;-)
|
|
| | /**
| | * The Employee Entity Bean handles the information of an employee.
| | * @author Karsten Jahn (OrangeOak)
| | * @version 1.0
| | *
| | * @ejb.bean
| | * name = "Employee"
| | * display-name = "EB_DataBase - Employee: Employee"
| | * description = "The Employee Entity Bean saves every Employee."
| | * view-type = "local"
| | * type = "CMP"
| | * cmp-version = "2.x"
| | * local-jndi-name = "ejb/medsched/employee/Employee"
| | * reentrant = "false"
| | *
| | * @ejb.pk class = "java.lang.Object"
| | *
| | * @jboss.persistence
| | * create-table = "true"
| | * remove-table = "false"
| | * datasource = "java:/mySQLDS"
| | * datasource-mapping = "mySQL"
| | * table-name = "employee"
| | *
| | * @jboss.unknown-pk
| | * class = "java.lang.Integer"
| | * auto-increment = "true"
| | * column-name = "employeeid"
| | * field-name="employeeID"
| | * sql-type = "INTEGER"
| | * jdbc-type = "INTEGER"
| | *
| | * @jboss.entity-command name = "mysql-get-generated-keys"
| | */
| | public abstract class EmployeeBean implements EntityBean {
| |
| | [...]
| |
| | /**
| | * @throws CreateException
| | * @ejb.create-method
| | */
| | public java.lang.Object ejbCreate(StaffMember employee) throws
CreateException {
| | setLastname(employee.lastname);
| | setFirstname(employee.firstname);
| | setTelephone(employee.telephone);
| | return null;
| | }
| | public void ejbPostCreate(StaffMember employee) {
| | }
| | }
| |
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839175#3839175
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839175
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user