Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DBMS inventory manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shrey Patel
DBMS inventory manager
Commits
8ded46bb
Commit
8ded46bb
authored
1 year ago
by
Sarthak Shrivastava
Browse files
Options
Downloads
Patches
Plain Diff
Fixed small bug with transfer ownership not working correctly.
parent
baf14d8b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/example/accessingdatamysql/myorg/MyOrgRosterRepository.java
+9
-0
9 additions, 0 deletions
...ample/accessingdatamysql/myorg/MyOrgRosterRepository.java
with
9 additions
and
0 deletions
src/main/java/com/example/accessingdatamysql/myorg/MyOrgRosterRepository.java
+
9
−
0
View file @
8ded46bb
...
...
@@ -91,6 +91,15 @@ public class MyOrgRosterRepository implements OrgRosterRepository{
nativeQuery
.
setParameter
(
"memberEmail"
,
memberEmail
);
int
updatedRows
=
nativeQuery
.
executeUpdate
();
if
(
type
==
OrganizationRoster
.
Type
.
OWNER
)
{
String
secondquery
=
"UPDATE ORGANIZATION SET owner_email = :memberEmail "
+
"WHERE organization_id = :orgId "
;
Query
secondnativeQuery
=
entityManager
.
createNativeQuery
(
secondquery
);
secondnativeQuery
.
setParameter
(
"orgId"
,
orgId
);
secondnativeQuery
.
setParameter
(
"memberEmail"
,
memberEmail
);
secondnativeQuery
.
executeUpdate
();
}
result
.
put
(
"result"
,
"success"
);
result
.
put
(
"updatedRows"
,
updatedRows
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment