← Back to team overview

mugle-dev team mailing list archive

Re: Services are completed

 

> All the model class services are completed as of now.


Awesome. Thanks.

My concerns are however, if a new object is to be made, then we should make
> sure the unique fields are
> kept unique and there is no duplication. The two ways I can think of are :
>
> 1. Whenever we are about to create a new object, check if all the fields
> are correct (uniqueess, etc) and then create it.
>
> 2. Have a separate method called 'createInDatabase()' (or something
> similar) that purely handles creation of
> new objects.
>

Yes. This is quite a tricky issue. #1 will not really work (there is still a
race condition) -- if you check that the fields are unique, then create a
new object, you may find that a new object with the same name was created in
the mean time. I'm not sure I understand #2.

P.S. Since most of the UI issues are sorted for now, I think I'll put the
> doc together for the wrapper classes and how they
> can be used. This will help Jens and everyone else if there are doubts.
>

Great. Thanks. It will help me too.

References