retrieve via UUID vs Association?

0
vs  Not sure what the opinions are here. Our Vehicle has a UUID, we pass this on the the NPE (because this is what our scheduler needs) We then need to update the actual entities. Do we set an association when creating the NPE or is the UUID enough?   UUID can only work via database, whereas association can work in memory (if available), right???   what is the effect on performance, vs maintainability?   EDIT: a resource is an NPE as we have Vehicles, Users and Equipment as a resource. so this would be 3 associations, or 1 UUID of the resource it is linked to. (if this matters)  
asked
2 answers
1

If both are NPE you should always use references because the database can not be used here. But for discussion sake, retrieving a single object based on a unique ID is really fast in the database. Even more if you have put an index on that field. But I would always use references if possible, but it depends a lot on how and when you need the other object.

 

Regards,

Ronald

 

answered
0

retrieving a single object based on a unique ID is really fast in the database. Even more if you have put an index on that field. But I would always use references

answered