Bug #361 (closed)
Opened 18 years ago
Closed 18 years ago
EventLog.idList generated sql type 'varchar(255)' is insufficient.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | blocker | Cc: | cxallan |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
Chris ran into this:
20:06:09,742 ERROR [JDBCExceptionReporter] ERROR: value too long for type character varying(255)20:06:09,745 ERROR [ServiceHandler] Exception thrown: Wrapped Exception: (org.springframework.dao.DataIntegrityViolationException):Hibernate operation: could not insert: [ome.model.meta.EventLog]; SQL [insert into eventlog (version, idList, action, type, event, id) values (?, ?, ?, ?, ?, ?)]; ERROR: value too long for type character varying(255); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
If idList is to remain a string type, it has to be text.
Change History (2)
comment:1 Changed 18 years ago by jmoore
- Cc callan added
comment:2 Changed 18 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
r970 fixes this by storing only a single entity in an EventLog. If the length of the EventLog table ever becomes an issue, we can revist, but for now this makes working with EventLogs easier and cleaner. (Using the Hibernate <any/> tag would have been another possibility, but would have required changes to the DSL. Can revist that later as well.)
r945 changes the EventLog.idList to the Hibernate TextType rather than StringType. This is an easy fix. A better solution would probably be to batch the creations, though this would lead to multiple event/action pairs in the DB. A third option would be to change idList-->id and simply have a log for every single row change.