User Activity

  • Modified a comment on discussion Help (English) on OpenXava

    Except Account class does NOT extend BaseEntity, as stated in my question. Thanks anyway, I appreciate your help nevertheless: knowing it is a problem related to how I use JPA, as opposed to how I use OX, is already very useful.

  • Modified a comment on discussion Help (English) on OpenXava

    Except Account class does NOT extend BaseEntity, as stated in my question. Thanks anyway, I appreciate your help nevertheless.

  • Posted a comment on discussion Help (English) on OpenXava

    Except Account class does NOT extends BaseEntity, as stated in my question. Thanks anyway, I appreciate your help nevertheless.

  • Modified a comment on discussion Help (English) on OpenXava

    I have this validation logic in place in my BaseEntity class. Then almost all other @Entity classes of my project extend BaseEntity, except Account: @AssertTrue(message="Not allowed") private boolean checkPerms() { TypedQuery<Account> aq = XPersistence.getManager() .createQuery("SELECT a FROM Account a WHERE a.username=:name", Account.class); aq.setParameter("name", Users.getCurrent()); Account acc = aq.getSingleResult(); return acc.roles.contains(Role.EDITOR.label); } When I try to update some entity,...

  • Modified a comment on discussion Help (English) on OpenXava

    I have this validation logic in place in my BaseEntity class. Then almost all other @Entity classes of my project extend BaseEntity, except Account: @AssertTrue(message="Not allowed") private boolean checkPerms() { TypedQuery<Account> aq = XPersistence.getManager() .createQuery("SELECT a FROM Account a WHERE a.username=:name", Account.class); aq.setParameter("name", Users.getCurrent()); Account acc = aq.getSingleResult(); return acc.roles.contains(Role.EDITOR.label); } When I try to update some entity,...

  • Modified a comment on discussion Help (English) on OpenXava

    I have this validation logic in place in my BaseEntity class. Then almost all other @Entity classes of my project extend BaseEntity, except Account: @AssertTrue(message="Not allowed") private boolean checkPerms() { TypedQuery<Account> a = XPersistence.getManager().createQuery("SELECT a FROM Account a WHERE a.nomeUtente=:nome", Account.class); a.setParameter("nome", Users.getCurrent()); Account acc = a.getSingleResult(); return acc.ruolo.contains(Role.EDITOR.label); } When I try to update some entity,...

  • Posted a comment on discussion Help (English) on OpenXava

    I have this validation logic in place in every entity of my project (in a BaseEntity class): @AssertTrue(message="Not allowed") private boolean checkPerms() { TypedQuery<Account> a = XPersistence.getManager().createQuery("SELECT a FROM Account a WHERE a.nomeUtente=:nome", Account.class); a.setParameter("nome", Users.getCurrent()); Account acc = a.getSingleResult(); return acc.ruolo.contains(Role.EDITOR.label); } When I try to update some entity, I get a StackOverlowError because this function is...

  • Posted a comment on discussion Debate (NOT FOR HELP) on OpenXava

    Can you please provide me with an example of how to do a calculated collection with OpenXava, or point me to some documentation about that? The base filtering logic would be something simple along the lines of SomeEntity[] results = ...; String cu = Users.getCurrent(); return Arrays.stream(results).filter(x -> x.getOwner().equals(cu)).toArray(); but I don't understand where I should write such code in OpenXava.

View All

Personal Data

Username:
lucrus
Joined:
2002-05-14 13:47:13
Location:
Villar Perosa / Italy / CEST
Gender:
Male

Projects

This is a list of open source software projects that Lucio Crusca is associated with:

Personal Tools