Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Per Minborg
    @minborg
    .filter($Person.name.notEquals(“71287618717187hdvahashv”))
    Partha Nath
    @ParthaNath28
    ok
    thanks
    Partha Nath
    @ParthaNath28
    sorry this did not work either
    the sql is generated fine and giving correct record count
    but from java its still 1
    return jpaStreamer.stream(Entity.class)
    .filter(Entity$.primaryKeyIdentifier.isNotNull())
    .count();
    I tried this one
    Per Minborg
    @minborg
    ok. Let’s wait for the issue to get examined.
    Thanks
    vinit patel
    @vinit_r_patel_twitter
    Hi Per-Ake, I had reported an issue last week regarding my Eclipse based Spring STS IDE could not detect the generated class even though they got generated and compiled successfully. Finally, I figured out that Eclipse based IDE does not like a file name ending with "$". If I rename the file name by replacing "$" with "", the IDE does recognize it. Is there any way to generate the source file with "" suffix instead of "$"?
    Per Minborg
    @minborg
    Ooops. Accoding to the Java Language Specification, a class can end with “_” and “$”. This must be a bug in Spring STS IDE/
    There is no way to replace the “$” (easilly). JPA is using “_” for its typed fields.
    (metadata)
    Ghost
    @ghost~62da6df56da03739849a62de
    Hey, is it possible to efficiently stream blobs or huge (byte) arrays instead of loading them completely into memory with this?
    Per Minborg
    @minborg
    Do you mean stream blobs but not load the actual contents until you actually reference the BLOB?
    Ghost
    @ghost~62da6df56da03739849a62de
    Something like that. Let's say you store huge images with some meta-data and actual content. Is it possible to stream that 30mb blob from the DB to potentially a user, without loading the whole 30mb all at once?
    You have a table Image with id, and data (byte[] or something else) columns. You want that one particular image, but it's 30mb huge. Is it possible to omit loading it completely into memory?
    jpa-streamer is surely great if you have a big list of (small) results. You can stream, filter, etc. What if I want one huge result? Can I stream that too?
    I hope I could explain my problem with those questions
    Per Minborg
    @minborg
    You could define an entity with just the small thumbnail for example and then only retriev the larger entity version once you actually need the large data. Also, there might be methods in JPA itself that supports this lazy loading.
    Ghost
    @ghost~62da6df56da03739849a62de

    I don't think you understood my problem. I want to retrieve the larger entity efficiently.

    public class HugeImage{

    // some annotations like @Id
    private long Id;

    // some annotations like @Lob and Lazy_loading,
    private byte[] content;

    // getters, setters
    }

    How do I use streams to retrieve the content, without loading the complete content all at once?

    Per Minborg
    @minborg
    JPAStreamer is just a thin wrapper around the actual JPA provider and so, this should work.
    David Ivkovic
    @davidivkovic
    Is this project dead?
    Per Minborg
    @minborg

    On the contrary, we just made a release and are now working with new features. Stay tuned.

    https://github.com/speedment/jpa-streamer/releases

    David Ivkovic
    @davidivkovic
    Thanks for the update, coming from LINQ in C# I really hope this gains more traction. Trying it now on a new project.
    David Ivkovic
    @davidivkovic

    Is it possible to filter by foreign key? Looking at the examples I couldn't really understand.
    For example:

    class Request {
    @OneToOne User user;
    }
    JPAStreamer.stream(Request.class).filter(Request$.user.id.equal("1")) ?

    Ravi Sharma
    @ravisharma:matrix.org
    [m]
    @quocnna_twitter: can you please let me know how you are opening stream mannually.. I am also facing the same issue with JPAStreamer "connection leak" in Hikari Pool.
    1 reply
    Julia Gustafsson
    @julgus

    @davidivkovic sorry for the delayed response. Can you try joining the users first? For example:

    JPAStreamer.stream(of(Request.class).joining(Request$.user))
    .filter(Request$.user.id.equal(1));

    Gautam Kumar Ray
    @raygautam
    please can any one tell me how to fetch data using foreign key using JPAStreamer.
    Gautam Kumar Ray
    @raygautam
    please can any one help me to solve the above problem.
    Julia Gustafsson
    @julgus
    Hi, can you please provide some more information about your use-case? You can always join in another data based on the FK.
    Gautam Kumar Ray
    @raygautam
    If i am connected two table using ManyToOne. And if i want to get data from this table on filtering using foreign key.
    Gautam Kumar Ray
    @raygautam
    Example. If i have two entiy one is state and another one as a district join together with ManyToOne relationship in district table. If i want to get data from district where the foreign key stateId equal same value. How to do filtering using foreign key.
    Julia Gustafsson
    @julgus

    I don't see how filtering using the foreign key, in this case, would be any different from filtering on a regular column. Thus the following should work (names on actual columns and classes may differ):

    jpaStreamer.stream(District.class).filter(District$.stateId.equal(1))

    If you are only interested in the District data, you don't need to join in the State table.

    Skadhir
    @vaithu
    I created an issue here speedment/jpa-streamer#288. When time permits, please look into this
    Julia Gustafsson
    @julgus
    Thank you, I will take a look!