actually CMP beans do not have to be named the same as the table, but you
would need a jaws.xml to override it if it wasnt.

Al

----- Original Message -----
From: Carlos Ferr�o <[EMAIL PROTECTED]>
To: jboss ml <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 8:53 PM
Subject: [JBoss-user] entity beans name = database tables name??


>
> Hi List,
>
> Thank you for your help with my problem with tables. I changed the entity
> bean name to "auth" and it is working. I didn't know that the name of
entity
> beans needed to be the same as my tables in my database. I was accessing
my
> db with the following code in my session bean:
> try {
>       listlogin_connection =
getDBConnection("java:/comp/env/jdbc/library");
> file://jndi namespace for db
>       listlogin_statement = listlogin_connection.prepareStatement("select
> login from auth");
>       listlogin_records = listlogin_statement.executeQuery();
>       while(listlogin_records.next()) {
> ...//get values from fields
>
> Although my session is CMP, I think this is a direct way to access my db
and
> it should never use the entity bean. Why is it used anyway? Do I really
have
> to change the name of my entity beans to the name of my database tables??
>
> Best Regards,
> Carlos Ferrao
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to