Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status hbm references non existent status column from SysLog #220

Open
alcarraz opened this issue Jul 21, 2021 · 4 comments
Open

Status hbm references non existent status column from SysLog #220

alcarraz opened this issue Jul 21, 2021 · 4 comments

Comments

@alcarraz
Copy link
Contributor

status column does not exist in SysLog entity. So accessing the events property creates an invalid SQL sentence. Maybe it should point to source?

<set name="events" lazy="true" cascade="all-delete-orphan"
order-by="id asc">
<key column="status"/>
<one-to-many class="org.jpos.ee.SysLog" />
</set>

alcarraz pushed a commit to alcarraz/jPOS-EE that referenced this issue Jul 22, 2021
jpos#220 Status hbm references non existent status column from SysLog
@ar
Copy link
Member

ar commented Jul 23, 2021

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants