Skip to content
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

Adding reflection #1

Open
schaumb opened this issue Jan 3, 2024 · 0 comments
Open

Adding reflection #1

schaumb opened this issue Jan 3, 2024 · 0 comments

Comments

@schaumb
Copy link

schaumb commented Jan 3, 2024

Can you implement/use reflection to reduce the Low amount of boilerplate code based on boost::pfr?

I created a method that can be used to get the names of aggregate-type members. See here.

If we assume that the class's first member (or named with id, or const member(s?)) is the primary key, the Table objects are unnecessary (Table can be named after the type).

So the final "initialization" can be:

auto connection = Connection<orm_type_1, orm_type_2>{}; // without Table, pure classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant