Hi I am using FlamingoDS to integrate seam with flex I have an entity called ItCargoPosition and one more entity called IcStorageNameDetail In ItCargoPosition entity private IcStorageNameDetail icStorageNameDetailByStorageName; private IcStorageNameDetail icStorageNameDetailByStorageRow; private IcStorageNameDetail icStorageNameDetailByStorageColumn;
@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "STORAGE_NAME", nullable = false) @NotNull public IcStorageNameDetail getIcStorageNameDetailByStorageName() { return this.icStorageNameDetailByStorageName; }
public void setIcStorageNameDetailByStorageName( IcStorageNameDetail icStorageNameDetailByStorageName) { this.icStorageNameDetailByStorageName = icStorageNameDetailByStorageName; }
@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "STORAGE_ROW", nullable = false) @NotNull public IcStorageNameDetail getIcStorageNameDetailByStorageRow() { return this.icStorageNameDetailByStorageRow; }
public void setIcStorageNameDetailByStorageRow( IcStorageNameDetail icStorageNameDetailByStorageRow) { this.icStorageNameDetailByStorageRow = icStorageNameDetailByStorageRow; }
@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "STORAGE_COLUMN", nullable = false) @NotNull public IcStorageNameDetail getIcStorageNameDetailByStorageColumn() { return this.icStorageNameDetailByStorageColumn; } public void setIcStorageNameDetailByStorageColumn( IcStorageNameDetail icStorageNameDetailByStorageColumn) { this.icStorageNameDetailByStorageColumn = icStorageNameDetailByStorageColumn; }
and in IcStorageNameDetail I have private Set itCargoPositionsForStorageRow = new HashSet( 0); private Set itCargoPositionsForStorageName = new HashSet( 0); private Set itCargoPositionsForStorageColumn = new HashSet( 0); @OneToMany(fetch = FetchType.LAZY, mappedBy = "icStorageNameDetailByStorageRow") public Set getItCargoPositionsForStorageRow() { return this.itCargoPositionsForStorageRow; }
public void setItCargoPositionsForStorageRow( Set itCargoPositionsForStorageRow) { this.itCargoPositionsForStorageRow = itCargoPositionsForStorageRow; }
@OneToMany(fetch = FetchType.LAZY, mappedBy = "icStorageNameDetailByStorageName") public Set getItCargoPositionsForStorageName() { return this.itCargoPositionsForStorageName; }
public void setItCargoPositionsForStorageName( Set itCargoPositionsForStorageName) { this.itCargoPositionsForStorageName = itCargoPositionsForStorageName; }
@OneToMany(fetch = FetchType.LAZY, mappedBy = "icStorageNameDetailByStorageColumn") public Set getItCargoPositionsForStorageColumn() { return this.itCargoPositionsForStorageColumn; }
public void setItCargoPositionsForStorageColumn( Set itCargoPositionsForStorageColumn) { this.itCargoPositionsForStorageColumn = itCargoPositionsForStorageColumn; }
the above are my entities and I have a created my own component to retrieve the details from the database as follows package com.infyz.toms.planning;
import java.util.List;
import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType;
import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Logger; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.jboss.seam.log.Log;
import com.infyz.toms.admin.configuration.cargooperations.entity.IcStorageName; import com.infyz.toms.ordermanagement.exportshipment.entity.ItCargoPosition;
@Name("planservice") @Stateless public class PlanSession implements PlanInterface{
@Logger private Log log;
@PersistenceContext(type=PersistenceContextType.TRANSACTION) private EntityManager em;
public List cargoPositionList() { return em.createQuery("from ItCargoPosition").getResultList(); } } In my mxml I am calling this method to get the values from the database
private function resultHandlerName(e:ResultEvent):void {
} here e.result will contain the return list from my component the problem here is I am not getting the values for the references to IcStorageNameDetail and my services-config.xml is false
and I didn't write any .as files corresponding to the entities please help me It's creating big pain for me