Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9089975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:16:08+00:00 2026-06-16T22:16:08+00:00

For our project we have a layer architecture. The DAO-Layer communicates with the Database

  • 0

For our project we have a layer architecture. The DAO-Layer communicates with the Database and gets the stored Entities. The Service-Layer communicates with the DAO-Layer to get the entities and implements more complex methods. Then the View-Layer communicates with the Serivce-Layer to get the needed information.

Part of the Entity:

@Entity
public class Operation implements Serializable {
private Integer id;

@GeneratedValue
@Id
public Integer getId() {
    return id;
}

public void setId(Integer id) {
    this.id = id;
}
private List<Participation> participations;

@OneToMany
public List<Participation> getParticipations() {
    return participations;
}

public void setParticipations(List<Participation> participations) {
    this.participations = participations;
}

DAO-Layer:

@Override
public Operation read(int id) {
    return this.em.find(Operation.class, id);
}

Service-Layer:

@Override
public Operation getOperation(Integer operationId)
{
    Operation operation = operationDAO.read(operationId);
    //operation.getParticipations();
    return operation;
}

View-Layer:

Operation o = opService.getOperation(operationId);

Using this without the operation.getParticipations(); on the View-Layer the participation-List is missing. If i add the stupid code then the object is forwarded correctly and the participation list is available.

I cant explain to myself why the object isn’t forwarded correctly? Can you help me? Thx in advance.

Edit: All other attributes/fields of the object are forwarded correctly (may important to know)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:16:09+00:00Added an answer on June 16, 2026 at 10:16 pm

    For @OneToMany default FetchType is LAZY.

    And The LAZY strategy is a hint to the persistence provider that data should be fetched lazily when it is first accessed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our project we have Service and DAO layers in separate Maven modules. Service
I’m trying to reevaluate our n-layer architecture and would love to get some suggestions
We have a few maven projects that inherit from eachother. Our persistence layer project's
We have a Java project which uses JSF. In our view layer we didn't
I want to apply NTFS-Search to our project. Our project have to find the
In our project we have requirement that, after receiving sms message from third party
In our project we have UI and logic (which may be represented as a
In our project we have a requirement that when a set of records are
I'm trying to bind in a third party app to our project but have
my team have built many tools for our project using win forms and Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.