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

Any possiblity for an example that uses a complex model #14

Closed
bjarnik opened this issue Mar 29, 2019 · 2 comments
Closed

Any possiblity for an example that uses a complex model #14

bjarnik opened this issue Mar 29, 2019 · 2 comments

Comments

@bjarnik
Copy link

bjarnik commented Mar 29, 2019

Is there any possibility of getting an example of how you would use this to return a complex object?

As an example, returning a object of the following form:

public class ComplexObect
{
    public ComplexPerson Child { get; set; }
    public ComplexPerson Uncle { get; set; }
}

public class ComplexPerson
{
    public ComplexKey Key { get; set; }
    public string Name { get; set; }
    public int Age { get; set; }
}

public class ComplexKey
{
    public int Key { get; set; }
    public int ReferenceKey { get; set; }
}
@bjarnik
Copy link
Author

bjarnik commented Mar 29, 2019

Nevermind, I figured it out.
I wasn't using XRoadSerializable the way it's meant to.
Seems to work now.

@bjarnik bjarnik closed this as completed Mar 29, 2019
@janno-p
Copy link
Owner

janno-p commented Apr 2, 2019

At the moment it's required to have XRoadSerializable type as a root type somewhere in the type hierarchy. I have thought about removing that requirement to simplify models, but haven't got to that yet.

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

2 participants