Hab folgenden trace gezogen (mit cachestatistiken)
nach den statistiken müsste das cache funktionieren, trotzdem wird ein sql statement aan die datenbank abgesetzt...
warum ist das so???
Code:
Hibernate: select max(userid) from sitemppo60.TUser
Hibernate: insert into sitemppo60.TUser (login, firstname, lastname, desciption, admin, userid) values (?, ?, ?, ?, ?, ?)
Hibernate: select max(projectid) from sitemppo60.Project
Hibernate: insert into sitemppo60.Project (createdby, createdon, name, description, projectid) values (?, ?, ?, ?, ?)
Hibernate: select project0_.projectid as projectid1_, project0_.createdby as createdby1_, project0_.createdon as createdon1_, project0_.name as name1_, project0_.description as descript5_1_ from sitemppo60.Project project0_ where project0_.name=?
Hibernate: select user0_.userid as userid0_0_, user0_.login as login0_0_, user0_.firstname as firstname0_0_, user0_.lastname as lastname0_0_, user0_.desciption as desciption0_0_, user0_.admin as admin0_0_ from sitemppo60.TUser user0_ where user0_.userid=?
SecondLevelCacheStatistics[hitCount=0,missCount=0,putCount=1,elementCountInMemory=1,elementCountOnDisk=0,sizeInMemory=1259]
duration: 359ms
Hibernate: select project0_.projectid as projectid1_, project0_.createdby as createdby1_, project0_.createdon as createdon1_, project0_.name as name1_, project0_.description as descript5_1_ from sitemppo60.Project project0_ where project0_.name=?
SecondLevelCacheStatistics[hitCount=0,missCount=0,putCount=1,elementCountInMemory=1,elementCountOnDisk=0,sizeInMemory=1259]
duration: 61ms
Hibernate: select project0_.projectid as projectid1_, project0_.createdby as createdby1_, project0_.createdon as createdon1_, project0_.name as name1_, project0_.description as descript5_1_ from sitemppo60.Project project0_ where project0_.name=?
SecondLevelCacheStatistics[hitCount=0,missCount=0,putCount=1,elementCountInMemory=1,elementCountOnDisk=0,sizeInMemory=1259]
duration: 54ms
Hibernate: select project0_.projectid as projectid1_, project0_.createdby as createdby1_, project0_.createdon as createdon1_, project0_.name as name1_, project0_.description as descript5_1_ from sitemppo60.Project project0_ where project0_.name=?
SecondLevelCacheStatistics[hitCount=0,missCount=0,putCount=1,elementCountInMemory=1,elementCountOnDisk=0,sizeInMemory=1259]
duration: 64ms
Hibernate: select project0_.projectid as projectid1_, project0_.createdby as createdby1_, project0_.createdon as createdon1_, project0_.name as name1_, project0_.description as descript5_1_ from sitemppo60.Project project0_ where project0_.name=?
SecondLevelCacheStatistics[hitCount=0,missCount=0,putCount=1,elementCountInMemory=1,elementCountOnDisk=0,sizeInMemory=1259]
duration: 62ms
Hibernate: delete from sitemppo60.Project where projectid=?
Hibernate: delete from sitemppo60.TUser where userid=?
wenn ich das ganze bei der klasse user versuch...
Code:
Hibernate: select max(projectid) from sitemppo60.Project
Hibernate: insert into sitemppo60.Project (createdby, createdon, name, description, projectid) values (?, ?, ?, ?, ?)
Hibernate: select user0_.userid as userid0_, user0_.login as login0_, user0_.firstname as firstname0_, user0_.lastname as lastname0_, user0_.desciption as desciption0_, user0_.admin as admin0_ from sitemppo60.TUser user0_ where user0_.login=?
duration: 286ms
duration: 4ms
duration: 0ms
duration: 0ms
duration: 0ms
Hibernate: delete from sitemppo60.Project where projectid=?
Hibernate: delete from sitemppo60.TUser where userid=?
... werden keine statements angesetzt (statistik ausgeblendet)