Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Extra Lazy Loading problems
[Teneo] Extra Lazy Loading problems [message #546349] Mon, 12 July 2010 14:13
Wolf Fischer is currently offline Wolf FischerFriend
Messages: 43
Registered: July 2009
Hi there (Hi Martin Wink),

as i have a large containment feature, i want to try the extra lazy loading property. So, first I set the property

props.setProperty(PersistenceOptions.FETCH_ASSOCIATION_EXTRA_LAZY, "true");

When i try to import data into the DB, i get the following exception:
org.hibernate.MappingException: Duplicate property mapping of GuideStylehorizontalGuides found in Guide
    at org.hibernate.mapping.PersistentClass.checkPropertyDuplication(
    at org.hibernate.mapping.PersistentClass.validate(
    at org.hibernate.mapping.RootClass.validate(
    at org.hibernate.cfg.Configuration.validate(
    at org.hibernate.cfg.Configuration.buildSessionFactory(
    at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.buildSessionFactory(
    at org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initialize(
    at brms.helper.StoreController.initializeDataStore(
    at brms.helper.ImportFile2DB.convert(
    at brm_s.StartUp.main(

The GuideStylehorizontalGuides seems to be a GMF class so i have no real influence on that one. Therefore i tried to annotate just the containment feature which i would actually need the lazy loading feature for with the corresponding attribute (@OneToMany(fetch=EXTRA) ), regenerated the model code and then retried importing my data into the database. However, then i get the following exception:

org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: SyntacticElement
    at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(
    at org.hibernate.type.EntityType.getIdentifier(
    at org.hibernate.type.ManyToOneType.isDirty(
    at org.hibernate.type.TypeFactory.findDirty(
    at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(
    at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(
    at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(
    at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(
    at org.hibernate.impl.SessionImpl.flush(
    at org.eclipse.emf.teneo.hibernate.HbSessionWrapper.flush(
    at org.eclipse.emf.teneo.hibernate.resource.HibernateResource.saveResource(
    at brms.helper.ModelUtils.saveDBResource(
    at brm_s.StartUp.main(

So I know that this element is not yet saved within the database, as i want to save the complete result at the end of the process. Which options do I have, to solve this problem? The SyntacticElement is one of the types that is part of this containment feature.

Thanks in advance!

Previous Topic:[CDO] Profiling CDO
Next Topic:Migrating to Delegates (Helios)
Goto Forum:

Current Time: Mon May 21 17:09:01 GMT 2018

Powered by FUDForum. Page generated in 0.01835 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top