Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

#4 Demonstrate the usage of MapStruct for bean mappings #249

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

agudian
Copy link

@agudian agudian commented Jun 10, 2015

The component tablemanagement now uses a mapper generated by MapStruct.

In the Eclipse m2e-Settings, you might need to activate the automatic configuration of the annotation-processing (Window->Preferences->Maven->Annotation Processing -> Automatically configure ...).

@oasp-ci
Copy link
Collaborator

oasp-ci commented Jun 10, 2015

Can one of the admins verify this patch?

@hohwille
Copy link
Member

Why do you have to extends AbstractEto? IMHO this seems like map struct can not deal properly with generics. Is my guess correct?

@hohwille
Copy link
Member

Did you fork a state that was not working? The compile error in travis looks like it is not related to map-struct. I think this is a compiler error I caused some time ago (by not following our guideline to use PRs) that has been fixed right after. You should merge the original oasp4j repo back into your PR clone repo.

@agudian
Copy link
Author

agudian commented Jun 24, 2015

Why do you have to extends AbstractEto? IMHO this seems like map struct can not deal properly with generics. Is my guess correct?

Right - somewhere along traversing the type hierarchy, the type bounds were lost - I still need to create an example that is complex enough to reproduce the issue for the MapStruct issue-tracker (my first attempts with just an abstract super class that binds the type-variable in the generic interface wasn't enough, as it worked in that case). But I'm sure it's something that can be fixed. 😉

Did you fork a state that was not working? The compile error in travis looks like it is not related to map-struct. I think this is a compiler error I caused some time ago (by not following our guideline to use PRs) that has been fixed right after. You should merge the original oasp4j repo back into your PR clone repo.

Locally, it worked and I was able to start the application... I've rebased my commit to the latest head now.

@hohwille
Copy link
Member

@hohwille
Copy link
Member

But I'm sure it's something that can be fixed.

you should use an established libarary for that instead of solving this by hand. Resolving type variables and determining the actual type of a getter is extremely tricky since java 1.5. Most solutions out there including hibernate and spring do it wrong and are buggy. You might create a fix for this particular case but then might still contain bugs elsewhere.
Try classmate, guava or mmm-util-core that all solve the problem properly.

@hohwille
Copy link
Member

@oasp-ci
Copy link
Collaborator

oasp-ci commented May 14, 2016

Can one of the admins verify this patch?

1 similar comment
@Devonfw-ci
Copy link

Can one of the admins verify this patch?

@CLAassistant
Copy link

CLAassistant commented Aug 21, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants