This content has been marked as final. Show 6 replies
in the view object while adding the entity object.. you can uncheck the 'Updateable' check box.. this will restrict the entity to be updated
So you don't need a EO at all. If you never will change anything you can just use a VO an base it on a query of the table. This will be read only by default.1 person found this helpful
Only other thing beside the solution you already mentioned is to overwrite the doDML() method and throw an exception when insert or update is called.
You may need to try creating a ViewObject as non Updatable using this specific EO(if the requirement id to display read only view based backed by entity object)
You need to set updatable property of entity object to false to make it non-updatable(General Tab -> Expand Type in property inspector -> Set Updatable property to false)
Many thank for your replies my friends, I got what I wanted. Sireesha's reply was what I wanted exactly and I will use it for now but I will think about Timo's suggestion, may be I don't need the entity object at all. Jobinesh and vinod, I think your suggestions make the view object read-only and not the entity object, am I right?
Generally speaking the overhead of having an EO is pretty small and the current thinking is that there are probably more advantages of having an EO under a nonupdatable VO than just having a read only VO with no EO1 person found this helpful