日期:2014-05-19 浏览次数:20793 次
<a href="competitions/findByUserIdBy.action" target="main">赛事管理</a>
<action name="findByUserIdBy" class="competitionsAction" method="findByUserId"> <result name="success">/web/competitions/competition.jsp </result> <result name="input">/web/competitions/deleteError.jsp</result> </action>
public String findByUserId() throws Exception { try { Map session = ActionContext.getContext().getSession(); String ids = session.get("userId").toString(); id = Long.parseLong(ids); listCompetitions = this.competitionsService.findByUserId(id); } catch (Exception e) { e.printStackTrace(); return INPUT; } return SUCCESS; }
Hibernate: select competitio0_.id as id10_, competitio0_.name as name10_, competitio0_.startTime as startTime10_, competitio0_.endTime as endTime10_, competitio0_.address as address10_, competitio0_.sponsors as sponsors10_, competitio0_.organizer as organizer10_, competitio0_.coOrganizer as coOrgani8_10_, competitio0_.status as status10_, competitio0_.remarks as remarks10_, competitio0_.userId as userId10_ from sportSys.dbo.competitions competitio0_ where competitio0_.userId='9' Hibernate: select competitio0_.id as id10_, competitio0_.name as name10_, competitio0_.startTime as startTime10_, competitio0_.endTime as endTime10_, competitio0_.address as address10_, competitio0_.sponsors as sponsors10_, competitio0_.organizer as organizer10_, competitio0_.coOrganizer as coOrgani8_10_, competitio0_.status as status10_, competitio0_.remarks as remarks10_, competitio0_.userId as userId10_ from sportSys.dbo.competitions competitio0_ where competitio0_.userId='9'
a different object with the same identifier value was already associated with the session: [com.yaxing.entity.Competitions#130]; nested exception is org.hibernate.NonUniqueObjectException: