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 8795053

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:20:05+00:00 2026-06-13T23:20:05+00:00

I have a mnesia table callable from two modules- obviously both modules needing to

  • 0

I have a mnesia table callable from two modules- obviously both modules needing to refer to the records of the table.

Is there any way to declare the record type in one module and use it in the other module, without having to redefine and maintain the declaration in two modules? At the moment I had to declare the record type in each module.

  • 0 0 Answers
  • 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-13T23:20:06+00:00Added an answer on June 13, 2026 at 11:20 pm

    You can declare it in an include file (in the typical app, it would be found in an include directory from the root of the app), then include it in each module.

    -include("myrecords.hrl").
    

    To see a practical example, I’ll refer you to the rebar repo so you can see how this is typically structured: https://github.com/rebar/rebar

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

Sidebar

Related Questions

I have an mnesia table t that contains records with a single field x
I have this function: show_employee_table() -> do(qlc:q([B || B <- mnesia:table(employee)])). What it does
I have an mnesia table with fields say f1, f2, f3. Now if I
I have an mnesia table with three fields, i, a and b, created using
I have two nodes on two different, identical Virtual Machines -- both identical CentOS
I have a table in mnesia and I need to update individual fields in
I have an mnesia database dump from an ejabberd server (DCD, DCL, and DAT
I have a mnesia table for this record. -record(peer, { peer_key, %% key is
Have done quite a bit of searching for a guide (of any substance) for
have 2 questions : A computer with 32-bit address uses 2-level page table (9

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.