Login Failed Error

Hey,

I created a project and it is giving a error.

I created a Entity called “Participant” as shown in Figure 1. This entity only has 1 attribute called user and it is an association of type “User[sec$User]”.

This attribute has one view (as Shown in Figure 2).

My project 4 screens in total (as shown in figure 3).

I have 1 service called TestService(as shown in figure 4), where i have method that gets all the users in the participant table, puts it into a list of type “Participants” and returns it (as shown in figure 5).

In figure 6 (the controller of the mainWindow), i that code to print out the login name of the users in the list that i have created in the service…

but every time i use the following code:

showNotification(p.getUser().getLogin());

it prevents me from logging into the application ( as shown in Figure 7).

Please help

Regards,

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Question Answered

Assumably, the problem is that the service returns Participants with the “_local” view. To get fields of the related User you should reload Participant. The following code should work well in your screen controller.

 Participant p = dataManager.reload(participant.get(i), "parcicipant-view");
showNotification(p.getUser().getLogin()); 

where can I change the code. can not find it anywhere.