Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jonathan Franchesco Torres Baca
    @jofrantoba
    Jonathan Franchesco Torres Baca
    @jofrantoba
    Hi, @andyjefferson
    image.png
    Is there a way to tell it that one entity within another is saved embedded?
    image.png
    Andy Jefferson
    @andyjefferson
    Embedded object maybe doesnt have a JDO "identity". JDOHelper.getObjectId?
    Jonathan Franchesco Torres Baca
    @jofrantoba
    image.png
    I want all that to be embedded
    make it a nested document
    Andy Jefferson
    @andyjefferson
    It has a section on MongoDB
    Jonathan Franchesco Torres Baca
    @jofrantoba
    thank you!
    Jonathan Franchesco Torres Baca
    @jofrantoba
    thank you very much, this is what i need
    It is a tourism startup, I leave the link so that you can see the progress
    Jonathan Franchesco Torres Baca
    @jofrantoba
    Hi
    Jonathan Franchesco Torres Baca
    @jofrantoba
    how do i put this connection with datanucleus
    "mongodb + srv: // jofrantoba: lvDmek9ERF2qbGww@clustersanboxindiant.qmitb.mongodb.net/indiant? retryWrites = true & w = majority"
    Jonathan Franchesco Torres Baca
    @jofrantoba
    image.png
    maybe I can place the cluster nodes
    primary node : clustersanboxindiant-shard-00-02.qmitb.mongodb.net:27017
    Secundary node 1: clustersanboxindiant-shard-00-01.qmitb.mongodb.net:27017
    Secundary node 2: clustersanboxindiant-shard-00-00.qmitb.mongodb.net:27017
    I tried with this
    super.setUrlConnection("mongodb:[clustersanboxindiant.qmitb.mongodb.net][/indiant]");
    it works but the time I get this in the log
    Jonathan Franchesco Torres Baca
    @jofrantoba
    [17/05/2021 23:41:58:827][DEBUG][DataNucleus.Connection] - Creando un pool de connecciones a la base de datos "indiant]" en 1 servidores (clustersanboxindiant.qmitb.mongodb.net:27017)
    [main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[clustersanboxindiant.qmitb.mongodb.net:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
    [17/05/2021 23:41:59:522][DEBUG][DataNucleus.Connection] - Created MongoClient object on resource tx
    [17/05/2021 23:41:59:523][DEBUG][DataNucleus.Connection] - Registrado la factoria de connecciones transaccionales bajo el nombre "mongodb"
    [17/05/2021 23:41:59:537][DEBUG][DataNucleus.Datastore] - ======================= Datastore =========================
    [17/05/2021 23:41:59:537][DEBUG][DataNucleus.Datastore] - StoreManager : "mongodb" (org.datanucleus.store.mongodb.MongoDBStoreManager)
    [17/05/2021 23:41:59:539][DEBUG][DataNucleus.Datastore] - Datastore : read-write
    [17/05/2021 23:41:59:539][DEBUG][DataNucleus.Datastore] - Schema Control : AutoCreate(Tables,Columns,Constraints), Validate(None)
    [17/05/2021 23:41:59:539][DEBUG][DataNucleus.Datastore] - Schema : NamingFactory=datanucleus2 identifierCase=null
    [17/05/2021 23:41:59:539][DEBUG][DataNucleus.Datastore] - Query Languages : JDOQL, JPQL
    [17/05/2021 23:41:59:539][DEBUG][DataNucleus.Datastore] - Queries : Timeout=0
    [17/05/2021 23:41:59:540][DEBUG][DataNucleus.Datastore] - ===========================================================
    [17/05/2021 23:41:59:540][DEBUG][DataNucleus.Datastore] - StoreManager now created
    [17/05/2021 23:41:59:546][DEBUG][DataNucleus.Persistence] - Started pool of ExecutionContext (maxPool=20, reaperThread=false)
    [17/05/2021 23:41:59:553][DEBUG][DataNucleus.Persistence] - ================= NucleusContext ===============
    [17/05/2021 23:41:59:553][DEBUG][DataNucleus.Persistence] - DataNucleus Context : Versión: "5.2.4" con JRE "1.8.0_242" en "Windows 10"
    [17/05/2021 23:41:59:553][DEBUG][DataNucleus.Persistence] - Persistence API : JDO
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - Plugin Registry : org.datanucleus.plugin.NonManagedPluginRegistry
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - ClassLoading : default
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - Persistence : pm-singlethreaded, nontransactional-read, nontransactional-write, reachability-at-commit, copy-on-attach, managed-relations(checked), deletion-policy=JDO2, serverTimeZone=America/Bogota
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - Transactions : type=RESOURCE_LOCAL, mode=datastore, isolation=read-committed
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - ValueGeneration : txn-isolation=read-committed connection=New
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - Cache : Level1 (soft), Level2 (soft, mode=UNSPECIFIED), QueryResults (soft), Collections/Maps
    [17/05/2021 23:41:59:554][DEBUG][DataNucleus.Persistence] - ================================================
    [17/05/2021 23:41:59:588][DEBUG][DataNucleus.Persistence] - ExecutionContext "org.datanucleus.ExecutionContextImpl@750fe12e" se abrió para la base de datos "org.datanucleus.store.mongodb.MongoDBStoreManager@f8908f6" con transaccion="org.datanucleus.TransactionImpl@3e587920"
    [17/05/2021 23:41:59:596][DEBUG][DataNucleus.Transaction] - Transaction created [DataNucleus Transaction, ID=1013899580-1, enlisted resources=[]]
    [17/05/2021 23:41:59:596][DEBUG][DataNucleus.Transaction] - Transacción empezada para el ExecutionContext org.datanucleus.ExecutionContextImpl@750fe12e (optimistic=false)
    [17/05/2021 23:41:59:597][DEBUG][DataNucleus.Persistence] - Haciendo el objeto persistente : "com.jofrantoba.model.jdo.daoentity.testentityindiantmongo.daoestadocuenta.EstadoCuenta@65f87a2c"
    [17/05/2021 23:41:59:614][DEBUG][DataNucleus.Cache] - Objeto "com.jofrantoba.model.jdo.daoentity.testentityindiantmongo.daoestadocuenta.EstadoCuenta@65f87a2c" (id="com.jofrantoba.model.jdo.daoentity.testentityindiantmongo.daoestadocuenta.EstadoCuenta:1") añadido a la Cache d
    Andy Jefferson
    @andyjefferson
    No idea what that "connection" is purporting to be. Supported options are shown on https://www.datanucleus.org/products/accessplatform_5_2/datastores/datastores.html#mongodb as well as by looking at the code
    Jonathan Franchesco Torres Baca
    @jofrantoba
    super.setUrlConnection("mongodb:[clustersanboxindiant-shard-00-02.qmitb.mongodb.net][/indiant][,clustersanboxindiant-shard-00-01.qmitb.mongodb.net[,clustersanboxindiant-shard-00-00.qmitb.mongodb.net]]");
    image.png
    Jonathan Franchesco Torres Baca
    @jofrantoba
    Hi
    @andyjefferson
    makePersistentAll should not call insertObjects of the mongodb plugin
    image.png
    Andy Jefferson
    @andyjefferson
    makePersistentAll calls what it needs to call to persist the objects. You refer to a StateManager method, which is for one object. You dont say whether this is optimistic transaction, at flush, or when. The code is what it is.
    Jonathan Franchesco Torres Baca
    @jofrantoba
    StateManagerImpl
    i use pm.makePersistentAll(entitys);
    image.png
    makepersistentall is saving one by one
    I am migrating the mongodb plugin to the latest version
    //collection.insert(dbObjects, new WriteConcern(1));
    collection.withWriteConcern(WriteConcern.W1);
    collection.insertMany(dbListObjects);
    Andy Jefferson
    @andyjefferson
    No idea what you're referring to. MongoDBPersistenceHandler.insertObjects calls insertObject one-by-one WHEN there is an IDENTITY value generator, and only then
    Andy Jefferson
    @andyjefferson
    A statemanager manages 1 object only. It currently can call StoreManager.insertObject IF THE OBJECT NEEDS PERSISTING IMMEDIATELY (i.e not optimistic txns). That won't be changed without affecting every other store plugin.
    Jonathan Franchesco Torres Baca
    @jofrantoba
    image.png
    image.png
    I manually put the id of the primary key
    well I will review datanuclues api jdo
    thanks you!
    Jonathan Franchesco Torres Baca
    @jofrantoba
    @andyjefferson
    is there a way to do insert bulk with datanucleus jdo?