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

Queries on nomin mapping #14

Closed
nishantoo7 opened this issue Aug 11, 2015 · 3 comments
Closed

Queries on nomin mapping #14

nishantoo7 opened this issue Aug 11, 2015 · 3 comments

Comments

@nishantoo7
Copy link

we are new to nomin mapping, we are are very much interested to use this nomin mapping in our project. when we use nomin we are facing some issues. please find below.

  1. we are getting permgen space error frequently when we invoke the code via nomin mapping. when we map these things via normal java code we are not facing this issue.
  2. we have 2 child classes for one parent. how are we going to typecast to specific child. ex:- B and C classes are extending A class.
@dobrynya
Copy link
Owner

Hi

  1. Please send me a unit test reproducing an error. I never encountered
    such an error.
  2. Sorry but I could not understand your intentions. Please send concrete
    sample classes. Suppose you can use expressions to implement your
    requirements.
    11 Авг 2015 г. 9:04 пользователь "nishantoo7" notifications@github.com
    написал:

we are new to nomin mapping, we are are very much interestaed to use this
nomin mapping in our project. when we use nomin we are facing some issues.
please find below.

  1. we are geeting permgen space error frequently when we invoke the code
    via nomin mapping. when we map thease things via normal java code we are
    not facing this issue.
  2. we have 2 child classes for one parent. how are we going to typecast to
    specific child. ex:- B and C classes are extending A class.


Reply to this email directly or view it on GitHub
#14.

@nishantoo7
Copy link
Author

We have the Object hierarchy as below:
Claim is the Parent
Claim has list of Party
A Party can be a Person or Organization.
Party has a list of Roles
Party also has a list of PartyAddress (“Many to Many” in such a way that a same address can be assigned to many Parties)
PartyAddress is an Address
Address has an Email and Telephone (both entities)

So when we start with Claim and do the mapping between our DTO and Entity objects, we are trying to do as:
• We have groovy files for: Claim, PartyAddress, Party, Address, Email, Telephone
• Trying to initialize nomin like
NominMapper nomin = new Nomin("Claims.groovy","Party.groovy",
"Telephone.groovy",
"Address.groovy",
"ClaimParty.groovy","ClaimsPartyRole.groovy","email.groovy",
"PartyAddress.groovy",
"ClaimPartyType2Organization.groovy");
• In the groovy files, we havethe mappings of the attributes

When the application tries to initialize the Nomin mapper as above, it encounters an outofmemory PermGen error.

Is Nomin able to do such 6-7 levels of mapping (complex data structure)? Have you or someone else encountered such scenarios before?
Please help with recommendations.

    As described in the example above,
    Claim has a list of Parties
    A Party can be a Person or Organization.
    Person extends Party
    Organization extends Party

How do we make Nomin figure out what type a Party is and so get that mapped to a Person object or an Organization object (based on the kind) dynamically?
We would get the request as a Party object which needs to be mapped to either Person or Organization based on an attribute (Party_Kind).
Please help.

@fixxer
Copy link
Contributor

fixxer commented Aug 11, 2015

Hi nishantoo7. Concerning your permgen issue, could it be so that you create NominMapper instance each time you perform mapping?

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

3 participants