Skip to content

Active Record pattern #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
iluwatar opened this issue Jun 23, 2015 · 18 comments
Open

Active Record pattern #79

iluwatar opened this issue Jun 23, 2015 · 18 comments
Labels
epic: pattern info: help wanted status: stale issues and pull requests that have not had recent interaction type: feature

Comments

@iluwatar
Copy link
Owner

iluwatar commented Jun 23, 2015

Description

The Active Record design pattern is a common architectural pattern used to manage database records. It simplifies data access by encapsulating the database logic within a model class. Each instance of the model corresponds to a row in the database, and the model class includes methods for CRUD (Create, Read, Update, Delete) operations.

Main Elements of Active Record Pattern:

  1. Model Class: Represents a table in the database. Each instance represents a single row.
  2. CRUD Operations: Methods for Create, Read, Update, and Delete operations are defined within the model.
  3. Database Connection: The model class manages the database connection.
  4. Simple Queries: Basic querying capabilities are encapsulated within the model.

References

Acceptance Criteria

  1. A new model class should be created, representing a database table.
  2. The model class should include methods for basic CRUD operations.
  3. The implementation should adhere to the project’s contribution guidelines and include relevant documentation and unit tests.
@stephen-lazarionok
Copy link

I may help with implementing this pattern. Please let me know if it's oaky with you.

@iluwatar
Copy link
Owner Author

Sure, go ahead, your contribution is welcome!

@stephen-lazarionok
Copy link

Okay, I will work on this pattern

@stephen-lazarionok
Copy link

Pull request #206 is prepared. Please review.

@stephen-lazarionok
Copy link

I've fixed the points raised and left my comments

@iluwatar
Copy link
Owner Author

jOOQ uses Active Record pattern: http://www.jooq.org/

@iluwatar
Copy link
Owner Author

iluwatar commented Jul 7, 2020

Described in book "Patterns of Enterprise Application Architecture" by Fowler

@iluwatar
Copy link
Owner Author

@TwentyVentti
Copy link

TwentyVentti commented Oct 12, 2022

@iluwatar I can help work on this pattern let me know if that’s okay with you.

@iluwatar
Copy link
Owner Author

Nice, please go ahead @TwentyVentti

sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
sergejsvisockis added a commit to sergejsvisockis/java-design-patterns that referenced this issue Apr 15, 2024
@iluwatar
Copy link
Owner Author

Updated task description

@ipaulaandreea
Copy link

@iluwatar Can you assign me with this task, please?

@iluwatar iluwatar moved this from Todo to In Progress in Java Design Patterns project Oct 13, 2024
ipaulaandreea added a commit to ipaulaandreea/java-design-patterns that referenced this issue Nov 5, 2024
Copy link

stale bot commented Dec 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Dec 13, 2024
@iluwatar iluwatar moved this from In Progress to Todo in Java Design Patterns project Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic: pattern info: help wanted status: stale issues and pull requests that have not had recent interaction type: feature
Projects
Development

Successfully merging a pull request may close this issue.

6 participants