Hello Danilo,

if I understand you right, you let JBossCMP to create and name fields
and tables. In this case there is no gaurantee your
query will be portable across different servers.
To have database schema the same using different app servers you need
to name all the fields and tables yourself and configure appropriate
DD file ( jbosscmp-jdbc.xml for JBoss ). Equivalent files should be
present in other app servers.

But there are other issues. For example, JBossCMP doesn't support
exposing primary keys as foreign in relationships (for now). And here sql
queries are not portable if another server supports this.

And another issue with dynamic queries. The implementation of dynamic
queries may differ form server to server. The following is a WL's
code. Compare it to JBoss approach:

InitialContext ic=new InitialContext();
FooHome fh=(FooHome)ic.lookup("fooHome");
QueryHome qh=(QueryHome)fh;
Sring ejbql="SELECT OBJECT(e)FROM EmployeeBean e WHERE e.name='rob'"
Query query=qh.createQuery();
query.setMaxElements(10)
Collection results=query.find(ejbql);

As you see it differs.

alex

Thursday, August 22, 2002, 3:27:13 AM, you wrote:

DLR> Hello,

DLR>   On another mail Dain Sundstrom says the spec does not say anything
DLR> about mapping of CMR to database tables.
DLR>   I need on my application the kind of feature of the JBoss DynamicQL.
DLR> But I will not want use it because I do not want use features
DLR> proprietary features, I want my application portable.
DLR>   But I need to be able to create sql querys at run time.
DLR>   My question is all applications server did the mapping of
DLR> relationships on the same way ? If I have a relationship Order to
DLR> OrderItens (1 - N) in all applications server this will be mapped as a
DLR> Integer field called Order in the table OrderItem ?
DLR>   If this happen I can do a "select * from Order, OrderItem where
DLR> Order.Id=OrderItem.Id" and this will work on all applications servers.
DLR>   I think the way JBoss maps the relationships is very logic and
DLR> clear. And Dain is not responsible by the implementations of other
DLR> application severs.
DLR>   But what you know about that ? Is a good idea make select this way ?

-- 
Best regards,
 Alex Loubyansky




-------------------------------------------------------
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=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to