We're using CMP with views (Oracle 8.1.7.4 I think) and we're able to update them.

However, our views are really just hidding certain things from the entities (e.g. 
there are lastupdated dates and things like that which aren't included in the view).

If you've got a column which is derived in the view you won't be able to update it (I 
think that's possible in newer versions of Oracle and possibly the Enterprise edition 
of Oracle 8i ???), but what you can do is use a trigger to catch the update and make 
the appropriate changes.

So I think CMP will have the same issues as any user of the view.

One thing we have had problems with is where we delete from our views we're actually 
just changing a state in the table "behind the scenes" and the records no longer 
appear in the view. If you're using Container Managed Relationships and you do 
something similar you've got to be careful that you don't have entries in other 
tables/views that still point to this - your tables may still have referential 
integrity (i.e. the Foreign Keys still apply), but the views might not. This isn't a 
problem if you properly delete the related entities (or get the CMP engine to do it 
for you), but if someone updates the state directly in the database you can have 
problems.

I hope that's useful. p.s. I'm a Java developer and not a DBA, so I'm no expert and I 
hope that's all correct. Also there's probably lots of other fancy features that I'm 
not aware of.

-Andrew

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3824345#3824345";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3824345>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to