Task #2547 (closed)
BUG: Webadmin Edit user groups
Reported by: | wmoore | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-Beta4.2 |
Component: | ORM | Version: | n.a. |
Keywords: | n.a. | Cc: | jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2010-06-24 (12) |
Description
Edited the name of a user and edited the groups of the user. User was previously in one group. Removed this group and added 3 others. Chose one of these as the default group. Hit save. Stack trace below...
Attachments (1)
Change History (14)
comment:2 Changed 14 years ago by wmoore
- Cc jmoore added
comment:3 Changed 14 years ago by wmoore
This is what the tables look like after the bug. Editing the index -3 -> 4 allows you to log into webadmin, but still can't remove groups from users.
omero=> select * from experimenter; id | permissions | email | firstname | institution | lastname | middlename | omename | version | external_id ----+-------------+-------+-----------+-------------+----------+------------+---------+---------+------------- 0 | 0 | | root | | root | | root | 0 | 1 | 0 | | Guest | | Account | | guest | 0 | 2 | -103 | | O | root | E | M | ome | 0 | (3 rows) omero=> select * from groupexperimentermap; id | permissions | owner | version | child | external_id | parent | child_index ----+-------------+-------+---------+-------+-------------+--------+------------- 0 | -35 | t | 0 | 0 | | 0 | 0 1 | -35 | f | 0 | 0 | | 1 | 1 2 | -35 | f | 0 | 1 | | 2 | 0 3 | -103 | t | 0 | 0 | | 3 | 2 5 | -103 | f | 0 | 2 | | 1 | 1 6 | -103 | f | 0 | 2 | | 4 | 0 4 | -103 | f | 0 | 2 | | 3 | -3 7 | -103 | f | 0 | 2 | | 5 | 2 8 | -103 | f | 0 | 2 | | 6 | 3 (9 rows) omero=> update groupexperimentermap set child_index = 4 where child_index = -3 ; UPDATE 1 omero=> select * from groupexperimentermap; id | permissions | owner | version | child | external_id | parent | child_index ----+-------------+-------+---------+-------+-------------+--------+------------- 0 | -35 | t | 0 | 0 | | 0 | 0 1 | -35 | f | 0 | 0 | | 1 | 1 2 | -35 | f | 0 | 1 | | 2 | 0 3 | -103 | t | 0 | 0 | | 3 | 2 5 | -103 | f | 0 | 2 | | 1 | 1 6 | -103 | f | 0 | 2 | | 4 | 0 7 | -103 | f | 0 | 2 | | 5 | 2 8 | -103 | f | 0 | 2 | | 6 | 3 4 | -103 | f | 0 | 2 | | 3 | 4 (9 rows)
comment:4 Changed 14 years ago by jmoore
Will, if you could turn on sql debugging in etc/log4j.xml and reproduce that'd be very useful.
Changed 14 years ago by wmoore
Logs with database logging on. Cleaned database & logs then reproduced bug.
comment:5 Changed 14 years ago by jmoore
This is related to #1056.
comment:6 Changed 14 years ago by jmoore
- Component changed from General to ORM
- Owner changed from atarkowska to jmoore
- Priority changed from minor to critical
- Status changed from new to assigned
There are several issues here:
- the triggers for ordered collections are not run on insert
- the method obj.setElement(int index, element) is not calling element.setParent( this )
- Possibly the model objects are not being used correctly. That will still have to be tested.
I'll be committing a fix shortly for the first two issues. It requires a new OMERO4.2__0 database!
comment:7 Changed 14 years ago by jmoore
See also #1679
comment:8 Changed 14 years ago by jmoore
Related Hibernate topics:
- https://forum.hibernate.org/viewtopic.php?f=1&t=960269&view=previous (unanswered)
- https://forum.hibernate.org/viewtopic.php?p=2426153 (unanswered)
- http://opensource.atlassian.com/projects/hibernate/browse/HHH-4008 (open)
- http://opensource.atlassian.com/projects/hibernate/browse/HHH-2679 (workaround; deferred unique - not available in postgres)
- http://opensource.atlassian.com/projects/hibernate/browse/HHH-1268 (ditto)
deferred uniques is a possibility for 8.5, but for the moment we may have to do without the unique constraint.
comment:9 Changed 14 years ago by jmoore
comment:10 Changed 14 years ago by jmoore
comment:11 Changed 14 years ago by jmoore
- Resolution set to fixed
- Status changed from assigned to closed
There were definitely dangling issues with the triggers from #1056 which needed fixing (which was r7404). However, this issue appeared so recently almost certainly because of the orphan-related issues from #2142. r7413 rolls completely back, and IAdmin.removeGroups() is now working again. Not sure if this will fix #1679 yet.
comment:12 Changed 14 years ago by jmoore
comment:13 Changed 13 years ago by jmoore <josh@…>
(In [5158bb56ba4cb9bcd8c966d4cfe54bba3d0a7a05/ome.git] on branch dev_4_1_custom) Reworking list triggers and fixing various model & filter errors. (See #2547)
git-svn-id: file:///home/svn/omero/trunk@7404 05709c45-44f0-0310-885b-81a1db45b4a6