Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #361 (closed)

Opened 16 years ago

Closed 16 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.


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 16 years ago by jmoore

  • Cc callan added

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.

comment:2 Changed 16 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.)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.62662 sec.)

We're Hiring!