Skip to content

Commit

Permalink
Datastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
sunil committed Sep 12, 2019
1 parent cfb2090 commit c8efee8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions concept/core/src/all/material/hibernate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ hibernate.properties

hibernate.hbm2ddl.auto= validate | update | create | create-drop
hibernate.show_sql=true
hibernate.dialect=org.hibernate.dialect.MySQLDialect

Setup
------------------------
Expand Down Expand Up @@ -96,7 +97,7 @@ Proxy, Eager and Lazy
--------------------------------------------
@ElementCollection(fetch=FetchType.Eager)
@Fetch(FetchMode.JOIN)
@JoinTable(name="USER_ADDRESS", @JoinColumns(@JoinColumn(name="USER_ID")) // USER_ID is FK
@JoinTable(name="USER_ADDRESS", joinColumns=@JoinColumn(name="USER_ID")) // USER_ID is FK
Collection<Address> addresses = new ArrayList<Address>();

FetchMode
Expand Down Expand Up @@ -125,7 +126,7 @@ Mapping
User.java
@OneToMany
@JoinTable(name="USER_VEHICLE",
joinColumns=@joinColumn(name="USER_ID"),
joinColumns=@joinColumn(name="USER_ID", referencedColumnName = "ID"),
inverseJoinColumns=@joinColumn(name="VEHICLE_ID")
)// If this is not defined then hibernate will create third table automatically.
private List<Vehicle> vehicles;
Expand Down
2 changes: 1 addition & 1 deletion concept/core/src/com/core/functional/L_Examples.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void main(String[] args) {
list.add(new Employee(2, "David", "Manager"));
list.add(new Employee(3, "Kim", "Admin"));
list.add(new Employee(4, "Drew", "Admin"));

groupingBy(list);
collectAsList(list);

Expand Down

0 comments on commit c8efee8

Please sign in to comment.