jpos / jPOS-EE

jPOS Extended Edition
http://jpos.org
GNU Affero General Public License v3.0
107 stars 153 forks source link

Status hbm references non existent status column from SysLog #220

Open alcarraz opened 3 years ago

alcarraz commented 3 years ago

status column does not exist in SysLog entity. So accessing the events property creates an invalid SQL sentence. Maybe it should point to source? https://github.com/jpos/jPOS-EE/blob/0756f3a1cdf78db8d4a27a11112d5ee6c2427dc3/modules/status/src/main/resources/org/jpos/ee/status/Status.hbm.xml#L41-L45

ar commented 3 years ago

This is on purpose. Originally, SysLog would have a column associated with the Revision History, and Status, and, and, and, but that doesn't scale well, so we've removed that relationship. Status could have an info-only SysLog id, suitable for most situations (without database integrity, though).

alcarraz commented 3 years ago

Sorry I don't know if I follow, problem is this generates a runtime error when accessing the events properties since it tries to execute an invalid SQL (status column does not exists) my proposal is either remove that relationship from the hbm or modify it by source without data integrity

alcarraz commented 3 years ago

With the modification proposed in #221 it works ok, it will create a SysLog for each event with source being the same as the status id

alcarraz commented 3 years ago

the line that fails is StatusManager.java#L11 when max events is not 0