W047 Empty Key Statement
[Previous]  [Next] 
|
User Manual [Previous]  [Next] W047 Empty Key StatementUmple semantic warning reported when a key statement has no elements inside of itAn empty key statement has no meaning, but Umple will detect the key statement and generate methods associated with having a key. This might lead the developer to think that they have defined a key, when in fact the generated methods cannot differentiate between instances of the class in question. The warning is shown to notify the developer of the potential mistake. Example// This example generates the message class A { id; key { } } Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears// The following shows how to avoid the message. class A { id; key { id } } Load the above code into UmpleOnline |