avatarIvan Franchin

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2023

Abstract

overy system delivers a seamless user design with the high accessibility users have come to expect. If a user forgets their password on Mogul, they go through a familiar front-end experience similar to resetting an email or social media password. They click on a ‘Forgot Password’ button, a link is sent, they receive an email, click the link, and the password is reset. However, on the back-end, Mogul built a smart wallet system using smart contracts for decentralized wallet recoverability. When users reset a wallet, they actually create a new authentication wallet that is programmed to have the capabilities of interacting with the smart wallet. Yet, on the front-end to the user, it looks like a simple password reset.</p><ul><li><b>Manual Transaction Signatures Eliminated:</b></li></ul><p id="f765">Users can send free and frictionless transactions within the platform without manual signatures. When you use other DeFi wallets, you generally have to interact with a Web 3 interface to manually confirm a transaction and pay a costly gas fee, especially as the network congests. For example, with Metamask and Web3, a user needs to give permissions to access their wallet and then the user needs to confirm the transaction:</p><figure id="5453"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*2Mf9SQSXGWdh9ndV"><figcaption></figcaption></figure><p id="333b">This process would need to happen for each action on Mogul. Not everyone who could benefit from Mogul’s technology is able to understand the nuances involved in a blockchain transaction, so Mogul offers sponsored, frictionless in-platform actions.</p><p id="5ebc">While other wallets require tech-savviness just to maneuver around, Mogul has re-engineered an incredibly complex system in a very simple way.</p><h1 id="8d0a">Smart Wallet Recovery Done Right</h1><figure id="ec20"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*DL3FUoeScVR5WMIa"><figcaption></figcaption></figure><p id="c212">Our wallet recovery process u

Options

ses the Mogul Guardian by default, which allows for safe and secure decentralized recoverability. This system provides a user with a new authentication wallet through a standard password reset flow.</p><p id="4c95">The system delivers a new authentication wallet to communicate with user funds.</p><p id="c638">A Mogul user can choose between using the default Mogul Guardian system, or reset their guardian(s) to their preference where more than one Guardian can be chosen. Guardians could be friends, hardware wallets, or a mixture of both. Thus, users can create a multi-channel authentication system for decentralized password and key recovery.</p><p id="c957">For example, if a user doesn’t want to use the Mogul Guardian, that user can designate Tracy (or Tracy, Bob, and Alice) as the guardian(s) and thereby make them the only entity that can change the authentication wallet, requiring their wallet’s permissions to do so.</p><p id="732c">The film industry can benefit from the Mogul Smart Wallet because it is easy-to-use and does not require the tech know-how that was asked from previous generations of blockchain wallets.</p><p id="a531">Mogul removes major points of friction to deliver a seamless end-user experience that makes using blockchain technology feel as natural as using the Internet when browsing the web.</p><p id="eaf7">We are always listening to our users. We welcome suggestions and feedback through our <a href="https://mogulproductions.com/contact">contact page</a>.</p><p id="c69c"><b>ABOUT MOGUL PRODUCTIONS (MOGUL)</b> <i>Mogul Productions, established 2019, is a blockchain-based film financier and production company with a presence in Canada, the United States of America and Europe.</i></p><p id="ed5a"><i>The Mogul platform connects contributors, film industry professionals and fans through technology that allows all users to engage and participate with each project throughout theirs entire lifecycle, from financing through to production and distribution.</i></p></article></body>

Spring Boot | Spring Data JPA

Understanding Relationships in JPA: Introduction

A series of articles where we will discuss the four types of relationships in JPA: one-to-one, one-to-many / many-to-one, and many-to-many

Photo by Sixteen Miles Out on Unsplash

I’ll be honest with you — I used to struggle with implementing these relationships correctly in my applications. I found myself constantly searching on Google and reading several articles to make sure I was doing it right.

In order to gain a better understanding of how these relationships work, I decided to conduct thorough research and create a GitHub repository called ivangfr/spring-data-jpa-relationships. This repository contains simple examples for each type of relationship, and has now become my go-to reference whenever I need to implement them.

To demonstrate each relationship type, I will present the necessary code to map the entities and examine how JPA/Hibernate generates tables in PostgreSQL database by describing the tables in PostgreSQL terminal.

I hope this series of articles as well as the GitHub repository can be a helpful resource for you as well.

Following are the JPA relationships that we will be discussing:

One-to-One with Simple Primary Key

We will associate the Team and TeamDetail entities. A team can have only one team detail, and a team detail belongs to only one team. Besides, TeamDetail entity will have its own auto increment ID.

One-to-One with Shared Primary Key

We will associate the Person and PersonDetail entities. A person can have only one person detail, and a person detail belongs to only one person. Additionally, we intend to utilize the Person’s ID as the primary key for the PersonDetail entity.

One-to-Many with Simple Primary Key

We will associate Restaurant and Dish entities. A restaurant can have zero, one, or more dishes, and a dish can only be in the menu of one restaurant. Additionally, the Dish entity will have its own auto increment ID.

One-to-Many with Composite Primary Key

We will associate Player and Weapon entities. A player can have zero, one, or more weapons, and a weapon can only belong to one player. Additionally, we intend to utilize the Player’s ID as the primary key for the Weapon entity.

Many-to-Many with Simple Primary Key

We will associate Writer and Book entities. A writer can write zero, one, or more books, and a book can be written by one or more writers.

Many-to-Many with Simple Primary Key and Extra Column

We will associate Reviewer, Article and Comment. Here, a reviewer can comment zero, one or more articles and an article can be commented by zero, one or more reviewers.

Many-to-Many with Composite Primary Key and Extra Column

We will associate Student and Course entities. A student can register to zero, one or more courses and one course can be composed by zero, one or more students. Additionally, it would be interesting to store the date when the student registered for the course and the student's grade in the course.

Conclusion

In this series of articles, we will explore the four different types of relationships in JPA: one-to-one, one-to-many / many-to-one, and many-to-many. By presenting simple examples for each type of relationship and providing necessary code to map the entities, we hope to help developers to gain a better understanding of the JPA relationships.

Support and Engagement

If you enjoyed this article and would like to show your support, please consider taking the following actions:

  • 👏 Engage by clapping, highlighting, and replying to my story. I’ll be happy to answer any of your questions;
  • 🌐 Share my story on Social Media;
  • 🔔 Follow me on: Medium | LinkedIn | Twitter | GitHub;
  • ✉️ Subscribe to my newsletter, so you don’t miss out on my latest posts.
Jpa
Technology
Database
Relational Databases
Spring Data Jpa
Recommended from ReadMedium