This project is read-only.

Ignore joined fields in Insert & Updates

Dec 14, 2009 at 5:10 PM
Edited Dec 16, 2009 at 5:59 AM

Hi,

I'm a beginner Opf3 user, hope that someone could help me, I made a persistent class using a custom Select SQL (specifying the SqlQuery using an ObjectSearcher),

This Select SQL get data from various tables, and I want to know if is there a way to use the ObjectContext.PersistChanges to update only the fields from the main table (the table used in the FROM clause) and not in the fields from joined tables that are as properties in the persistent class.

I see that there is a attribute PersistBehavious for Fields but that works only for Inserts OR Updates, and I want that it works for Inserts AND Updates. If is there another method to do that, I would thank you for indicating me.

Thanks in advance.

Julio S.

Dec 14, 2009 at 6:00 PM

Got it:

[Field("Foo", PersistBehaviours = PersistBehaviours.DontInsert | PersistBehaviours.DontUpdate)] made the trick.

Julio.