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

Cannot load fixture initial-data.yml #2

Open
lordtyron opened this issue Nov 10, 2010 · 9 comments
Open

Cannot load fixture initial-data.yml #2

lordtyron opened this issue Nov 10, 2010 · 9 comments

Comments

@lordtyron
Copy link

I can't load initial-data.yml, when in that document contain embedded document.
Can you please give me suggestion how to do this ?

I'm using MorphiaFixtures.load("initial-data.yml");

This is content of initial-data.yml :

Port(idjak):
    code: IDJAK
    name: Jakarta
    costtariff(idjak):
        type: A
        harbor: 0.10
        queue: 0.10
        pilotfix: 0.10
        pilotvar: 0.10
        light: 0.10
        gnt: 0.10
        tug(idjak):
            - minimum: 1
              maximum: 3500
              fixed: 100.50
              var: 0.0040
            - minimum: 3501
              maximum: 8000
              fixed: 200.10
              var: 0.0040

Thanks for your help.

@greenlaw110
Copy link
Collaborator

hi can u send me ur java model file? thx a lot

@lordtyron
Copy link
Author

Sent to your email, please check.
Thanks.

@greenlaw110
Copy link
Collaborator

This is due to Play's constraint on binding. The workaround is to pass entity id instead of entity between controller interface

@lordtyron
Copy link
Author

Can you give me your example about "to pass entity id instead of entity between controller interface" ?

@greenlaw110
Copy link
Collaborator

public static register(Object id) {
ObjectId oid = new ObjectId(id.toString());
}

public static anotherControllerMethod() {
...
ObjectId oid = ...
register(oid.toString());

@lordtyron
Copy link
Author

I'm sorry if i'm not understand your example.
How we can make the yml file i posted can be loaded ?
Please, could you explain more clearly ?
Thanks.

@greenlaw110
Copy link
Collaborator

hi are you "[email protected]"? can we talk on email?

@lordtyron
Copy link
Author

Me is [email protected].
I ask you about this matter in email too.

@greenlaw110
Copy link
Collaborator

Sorry, I confuse this issue with another. The issue is still there, it's due to limitation of Play, check http://groups.google.com/group/play-framework/browse_thread/thread/14da04dcdfc495b8 for detail

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