i think i see the point --- CMP's must be set in the entity bean's ejbCreate method, which returns the primary key. and CMR's must be set in the beans ejbPostCreate method, which is called after creation. thus, the CMR fields formally can *not* be part of the primary key (correct me if i'm wrong).
but what you're saying is that a CMP primary key field and a CMR field as a foreign key can both share the same column in a database table. i tried that and it seems to work. to make things appear to be in 'normal form', i also hide that 'extra' CMP field (the one shared with the CMR field) by not exposing it in any ejb interface; its only set in ejbCreate(). to maintain primary key integrity with caching and everything else, i guess i should not expose the set...() CMR method in any interface either. is this correct? thanks again, mike View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823425#3823425 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823425 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user