Skip to Content
Full Stack Development with JHipster
book

Full Stack Development with JHipster

by Deepu K Sasidharan, Sendil Kumar N
March 2018
Intermediate to advanced content levelIntermediate to advanced
380 pages
9h 23m
English
Packt Publishing
Content preview from Full Stack Development with JHipster

Relationships

Now that we have defined our entities, let's add relationships between them:

  1. Add the following snippet for relationships into the JDL Studio editor:
relationship OneToOne {    Customer{user} to User}

The first relationship declared is a unidirectional OneToOne between a Customer entity and the inbuilt User entity: 

Customer (1) -----> (1) User

It means the Customer entity knows about the User and is the owner of the relationship but the User doesn't know about the Customer and hence we will not be able to obtain customers from a User. This lets us map customers to the User entity and use that for authorization purposes later ensuring one customer can be mapped only to one system user.

  1. Add this snippet for relationships into ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Full Stack Development with JHipster - Second Edition

Full Stack Development with JHipster - Second Edition

Deepu K Sasidharan, Sendil Kumar Nellaiyapen
Jasmine Cookbook

Jasmine Cookbook

Munish Kumar

Publisher Resources

ISBN: 9781788476317Supplemental Content