Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 03 2017 20:53
    tejainece opened #101
  • Jun 03 2017 20:52
    tejainece closed #100
  • Jun 03 2017 20:41
    tejainece synchronize #100
  • Jun 03 2017 20:15
    tejainece opened #100
  • Jun 03 2017 19:46

    tejainece on master

    Merge pull request #25 from Jag… Jaguar 0.5.x primary changes Big step towards 0.5.0 and 1 more (compare)

  • Jun 03 2017 19:46
    tejainece closed #99
  • Jun 03 2017 18:18
    tejainece opened #99
  • Mar 09 2017 18:38
    tejainece closed #98
  • Mar 09 2017 18:38
    tejainece commented #98
  • Mar 04 2017 08:39
    tejainece opened #98
  • Mar 03 2017 15:43
    tejainece closed #95
  • Mar 03 2017 15:43
    tejainece commented #95
  • Feb 28 2017 17:00
    lejard-h assigned #97
  • Feb 28 2017 17:00
    lejard-h assigned #96
  • Feb 28 2017 17:00
    lejard-h opened #97
  • Feb 28 2017 17:00
    lejard-h opened #96
  • Feb 28 2017 16:58
    lejard-h closed #90
  • Feb 28 2017 16:58
    lejard-h commented #90
  • Feb 27 2017 21:39

    Kleak on master

    Version bump Merge pull request #24 from Jag… Added glob route matching witho… and 2 more (compare)

  • Feb 27 2017 21:39
    Kleak closed #92
Ravi Teja Gudapati
@tejainece
@rhalff can you get me a reproducable? Using serializer and orm together should not result in conflict
Rob Halff
@rhalff
@tejainece I think it'sField from jaguar_serializer which is conflicting with Field from jaguar_orm, I solved it by importing more concisely using show. So it's not necessarily a bug, just confusing when both packages are imported in full.
To reproduce it just import jaguar_serializer inside the same file where a bean is defined.
Rob Halff
@rhalff
The versions are 2.2.6 and 2.2.12, so the latest.
Ravi Teja Gudapati
@tejainece
Thanks. I will look into it
Rob Halff
@rhalff
I'm confused with the concept of <Model>.make() definition. what is make? is it a quick way of defining a constructor function? Why is it not preceded with a factory keyword? It's more of a dart question I guess.
I want to set a createdAt time for new models, but not sure where to do it. Nothing should be set from the default constructor right? because models also will get instantiated during finds etc.
Rob Halff
@rhalff
Is there any larger example project available using jaguar_orm? Each and every example seems to do things differently.
mbartnik
@mbartnik
hello, I have a weird problem with an id column being overwritten while upserting a row into different table, is this a good place to ask a support question?
mbartnik
@mbartnik
One table, let's call it A, has a column C which is a table with @HasOne(C) annotation, the second table B also has a column C with the same annotation. Table C has aId and bId columns, both with @BelongsTo annotation for A and B respectevily. First I upsert a row into table A, which contains C column with primary key id = 1, then I upsert a row into B table with the same C column object. After upserting into A, aId in C table equals 1, after upserting into B, aId is null and bId now equals 1.
mbartnik
@mbartnik
class A {
@PrimaryKey()
int id;
@HasOne(CBean)
C c;
}

class B {
@PrimaryKey()
int id;
@HasOne(CBean)
C c;
}

class C {
@PrimaryKey()
int id;
@BelongsTo(ABean, isNullable: true)
int aId;
@BelongsTo(BBean, isNullable: true)
int bId;
}
mbartnik
@mbartnik
found out that the issue lies in that the B table upsert has null which overwrites the aId passed in A table upsert and that passing onlyNonNull: true should fix it but:
  1. onlyNonNull isn't passed along to lower levels like cascade is
  2. even when we passed it manually in generated .jorm it still didn't work :)
Sung-Chul Lee
@sclee15
How can i log exceptions in the logger in Jaguar?
Rojackse
@Rojackse
image.png
Is this a bug?how to fix?
mbartnik
@mbartnik
@tejainece hello, can I ask you to provide some feedback for the last question asked in Jaguar-dart/jaguar_orm#88 ? It's the source of my problems and would really like for onlyNonNull to be passed down.
mbartnik
@mbartnik
actually, scratch that, my real problem is that upsert in SqfliteAdapter does INSERT OR REPLACE instead of INSERT OR UPDATE but I understand that it's not an easy problem...
kingdevnl
@kingdevnl
Is it normal that jaguar takes a while before its started
Ravi Teja Gudapati
@tejainece
@kingdevnl no
Rob Halff
@rhalff
Is this the way to do a find many or any find actually: golfCourseFeature.findMany( Find('golf_feature_features'), );
It's rather redundant, because golfCourseFeature already knows it's table name.
I'm probably doing it wrong, but cannot find the correct way.
Hm ok, think I should scroll up and find some examples :)
Ravi Teja Gudapati
@tejainece
This message was deleted
@rhalff there should be findwhere
agr111
@agr.ash_gitlab
@mbartnik did you get any workaround for your problem?
mbartnik
@mbartnik
hello, yes but its imperfect
edited in the branch link
i dont think its feasible to merge in with the master in main library, since i've noticed that @tejainece started doing his own solution for my problems but didn't finish it (the @ForeignKey annotation)
agr111
@agr.ash_gitlab
I saw that :) @tejainece could you comment on the issue? Is there any better workaround? Are polymorphic relations supported: Jaguar-dart/jaguar_orm#92 ?
elnurvl
@elnurvl
Hi. I could not find a solution in the Internet, so I have to ask my questions here. Sorry, if these are duplicate. Is there any way to get the library work with built_value models? Another question is it possible to use String primary keys instead of integer?
Rob Halff
@rhalff
@elnurvl yes you can use string primary keys, not sure if using build_value will work, if you look at the generated code it assigns properties directly to the model.
or is direct assignment also possible with build_value? (I'm not using it).
Ravi Teja Gudapati
@tejainece
@elnurvl there are plans to add suppprt for immutable models
PRs are welcome too.
Rob Halff
@rhalff

I have this retro api:

 @PostReq(path: '/shoppingcart/add')
 Future<List<CartWithProduct>> shoppingcartAddPost(
   @AsFormField() String cartId,
   int productId,
   @AsFormField() String attributes,
 );

But it generates this code:

  Future<List<CartWithProduct>> shoppingcartAddPost(
      String cartId, int productId, String attributes) async {
    var req = base.post
        .path(basePath)
        .path("/shoppingcart/add")
        .urlEncodedFormField(cartId, cartId)
        .urlEncodedFormField(attributes, attributes);
    return req.go(throwOnErr: true).map(decodeList);
  }
Am I doing something wrong with the definition of shoppingcartAddPost?
Rob Halff
@rhalff
Post only works with @AsJson() perhaps?
Jaumard
@jaumard
Look like a bug I'll say, open an issue
Rob Halff
@rhalff
@jaumard thanks, I'll also look into it as I need it at the moment.
@jaumard it's just fixing the quotes right?
Perhaps I can use @Form as a workaround, but would have to create an extra unnecessary class for that.
Jaumard
@jaumard
@rhalff I guess it's just that yes, you can add them see if your request is ok with them. Of yes
If yes you have the fix
Ravi Teja Gudapati
@tejainece
@rhalff Thanks for the fix. Merged and published it to pub.
Rob Halff
@rhalff
@tejainece ok cool, thanks! :)
For me it was super useful to generate the client code.