بتاريخ: 13 نوفمبر 201213 سنة comment_229061 السلام عليكم ورحمة الله وبركاتهالاخوة الافاضلتواجهنى مشكلة عند عمل master detail عند الضغط على زرار create insert يظهر هذا الخطأDetail entity Projects with row key oracle.jbo.Key[7 ] cannot find or invalidate its owning entity.حاولت البحث ولكن دون جدوى ارجو المساعدة تقديم بلاغ
بتاريخ: 14 نوفمبر 201213 سنة comment_229073 تأكد من قيمة المفتاح الأساسي المدخلة. قد تكون القيمة التي تحاول تنفيذها موجودة بالفعل في بيانات الجدول تقديم بلاغ
بتاريخ: 14 نوفمبر 201213 سنة كاتب الموضوع comment_229090 السلام عليكم ورحمة الله وبركاتهالمهندس /مصطفى اشكر لسيادتك ردك ومحاولة المساعدة ولكن للعلم فان الجداول لا يوجد بها بيانات على الاطلاق وprimary key generated from sequence for master tableوللعلم لقد نفذت الخطوات المذكورة فى الفديوهات الموجودة على موقع شركتكم الموقرة ولكن للاسف ظهر لى هذا الخطأ والذى لا اعلم حتى الان ما هو سببه .لذا ارجو منك ومن الاخوة المساعدة لكى اصل الى حل هذه المشكلةشكرا تقديم بلاغ
بتاريخ: 14 نوفمبر 201213 سنة comment_229091 رسالة الخطأ تبين وجود القيمة 7 للمفتاح الأساسي وبالتالي تأكد من الكود الذي عندك تقديم بلاغ
بتاريخ: 14 نوفمبر 201213 سنة كاتب الموضوع comment_229104 رسالة الخطأ تبين وجود القيمة 7 للمفتاح الأساسي وبالتالي تأكد من الكود الذي عندك هذه القيمة نتيجة وجو الكود المسئول عن تنفيذ ال sequence والموجود فى ال create method وهذا هو الكود الموجود فى ال entity impl الجدول الماسترpackage model;import java.math.BigDecimal;import oracle.jbo.AttributeList;import oracle.jbo.Key;import oracle.jbo.Row;import oracle.jbo.RowIterator;import oracle.jbo.domain.Number;import oracle.jbo.server.AttributeDefImpl;import oracle.jbo.server.EntityDefImpl;import oracle.jbo.server.EntityImpl;import oracle.jbo.server.SequenceImpl;import oracle.jbo.server.TransactionEvent;// ---------------------------------------------------------------------// --- File generated by Oracle ADF Business Components Design Time.// --- Tue Nov 13 18:56:18 AST 2012// --- Custom code may be added to this class.// --- Warning: Do not modify method signatures of generated methods.// ---------------------------------------------------------------------public class ProjectsImpl extends EntityImpl { /** * AttributesEnum: generated enum for identifying attributes and accessors. Do not modify. */ public enum AttributesEnum { ProjectId { public Object get(ProjectsImpl obj) { return obj.getProjectId(); } public void put(ProjectsImpl obj, Object value) { obj.setProjectId((Number)value); } } , SubsidiaryId { public Object get(ProjectsImpl obj) { return obj.getSubsidiaryId(); } public void put(ProjectsImpl obj, Object value) { obj.setSubsidiaryId((BigDecimal)value); } } , UserCode { public Object get(ProjectsImpl obj) { return obj.getUserCode(); } public void put(ProjectsImpl obj, Object value) { obj.setUserCode((String)value); } } , PrimaryName { public Object get(ProjectsImpl obj) { return obj.getPrimaryName(); } public void put(ProjectsImpl obj, Object value) { obj.setPrimaryName((String)value); } } , SecondaryName { public Object get(ProjectsImpl obj) { return obj.getSecondaryName(); } public void put(ProjectsImpl obj, Object value) { obj.setSecondaryName((String)value); } } , Address { public Object get(ProjectsImpl obj) { return obj.getAddress(); } public void put(ProjectsImpl obj, Object value) { obj.setAddress((String)value); } } , ProfitePercentage { public Object get(ProjectsImpl obj) { return obj.getProfitePercentage(); } public void put(ProjectsImpl obj, Object value) { obj.setProfitePercentage((BigDecimal)value); } } , DepreciationPercentage { public Object get(ProjectsImpl obj) { return obj.getDepreciationPercentage(); } public void put(ProjectsImpl obj, Object value) { obj.setDepreciationPercentage((BigDecimal)value); } } , BillOfQuantity { public Object get(ProjectsImpl obj) { return obj.getBillOfQuantity(); } public void put(ProjectsImpl obj, Object value) { obj.setAttributeInternal(index(), value); } } , ProjectGroups { public Object get(ProjectsImpl obj) { return obj.getProjectGroups(); } public void put(ProjectsImpl obj, Object value) { obj.setAttributeInternal(index(), value); } } , Subsidaries { public Object get(ProjectsImpl obj) { return obj.getSubsidaries(); } public void put(ProjectsImpl obj, Object value) { obj.setSubsidaries((SubsidariesImpl)value); } } ; private static AttributesEnum[] vals = null; private static int firstIndex = 0; public abstract Object get(ProjectsImpl object); public abstract void put(ProjectsImpl object, Object value); public int index() { return AttributesEnum.firstIndex() + ordinal(); } public static int firstIndex() { return firstIndex; } public static int count() { return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length; } public static AttributesEnum[] staticValues() { if (vals == null) { vals = AttributesEnum.values(); } return vals; } } public static final int PROJECTID = AttributesEnum.ProjectId.index(); public static final int SUBSIDIARYID = AttributesEnum.SubsidiaryId.index(); public static final int USERCODE = AttributesEnum.UserCode.index(); public static final int PRIMARYNAME = AttributesEnum.PrimaryName.index(); public static final int SECONDARYNAME = AttributesEnum.SecondaryName.index(); public static final int ADDRESS = AttributesEnum.Address.index(); public static final int PROFITEPERCENTAGE = AttributesEnum.ProfitePercentage.index(); public static final int DEPRECIATIONPERCENTAGE = AttributesEnum.DepreciationPercentage.index(); public static final int BILLOFQUANTITY = AttributesEnum.BillOfQuantity.index(); public static final int PROJECTGROUPS = AttributesEnum.ProjectGroups.index(); public static final int SUBSIDARIES = AttributesEnum.Subsidaries.index(); /** * This is the default constructor (do not remove). */ public ProjectsImpl() { } /** * @return the definition object for this instance class. */ public static synchronized EntityDefImpl getDefinitionObject() { return EntityDefImpl.findDefObject("model.Projects"); } /** * Gets the attribute value for ProjectId, using the alias name ProjectId. * @return the value of ProjectId */ public Number getProjectId() { return (Number)getAttributeInternal(PROJECTID); } /** * Sets <code>value</code> as the attribute value for ProjectId. * @param value value to set the ProjectId */ public void setProjectId(Number value) { setAttributeInternal(PROJECTID, value); } /** * Gets the attribute value for SubsidiaryId, using the alias name SubsidiaryId. * @return the value of SubsidiaryId */ public BigDecimal getSubsidiaryId() { return (BigDecimal)getAttributeInternal(SUBSIDIARYID); } /** * Sets <code>value</code> as the attribute value for SubsidiaryId. * @param value value to set the SubsidiaryId */ public void setSubsidiaryId(BigDecimal value) { setAttributeInternal(SUBSIDIARYID, value); } /** * Gets the attribute value for UserCode, using the alias name UserCode. * @return the value of UserCode */ public String getUserCode() { return (String)getAttributeInternal(USERCODE); } /** * Sets <code>value</code> as the attribute value for UserCode. * @param value value to set the UserCode */ public void setUserCode(String value) { setAttributeInternal(USERCODE, value); } /** * Gets the attribute value for PrimaryName, using the alias name PrimaryName. * @return the value of PrimaryName */ public String getPrimaryName() { return (String)getAttributeInternal(PRIMARYNAME); } /** * Sets <code>value</code> as the attribute value for PrimaryName. * @param value value to set the PrimaryName */ public void setPrimaryName(String value) { setAttributeInternal(PRIMARYNAME, value); } /** * Gets the attribute value for SecondaryName, using the alias name SecondaryName. * @return the value of SecondaryName */ public String getSecondaryName() { return (String)getAttributeInternal(SECONDARYNAME); } /** * Sets <code>value</code> as the attribute value for SecondaryName. * @param value value to set the SecondaryName */ public void setSecondaryName(String value) { setAttributeInternal(SECONDARYNAME, value); } /** * Gets the attribute value for Address, using the alias name Address. * @return the value of Address */ public String getAddress() { return (String)getAttributeInternal(ADDRESS); } /** * Sets <code>value</code> as the attribute value for Address. * @param value value to set the Address */ public void setAddress(String value) { setAttributeInternal(ADDRESS, value); } /** * Gets the attribute value for ProfitePercentage, using the alias name ProfitePercentage. * @return the value of ProfitePercentage */ public BigDecimal getProfitePercentage() { return (BigDecimal)getAttributeInternal(PROFITEPERCENTAGE); } /** * Sets <code>value</code> as the attribute value for ProfitePercentage. * @param value value to set the ProfitePercentage */ public void setProfitePercentage(BigDecimal value) { setAttributeInternal(PROFITEPERCENTAGE, value); } /** * Gets the attribute value for DepreciationPercentage, using the alias name DepreciationPercentage. * @return the value of DepreciationPercentage */ public BigDecimal getDepreciationPercentage() { return (BigDecimal)getAttributeInternal(DEPRECIATIONPERCENTAGE); } /** * Sets <code>value</code> as the attribute value for DepreciationPercentage. * @param value value to set the DepreciationPercentage */ public void setDepreciationPercentage(BigDecimal value) { setAttributeInternal(DEPRECIATIONPERCENTAGE, value); } /** * getAttrInvokeAccessor: generated method. Do not modify. * @param index the index identifying the attribute * @param attrDef the attribute * @return the attribute value * @throws Exception */ protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception { if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { return AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].get(this); } return super.getAttrInvokeAccessor(index, attrDef); } /** * setAttrInvokeAccessor: generated method. Do not modify. * @param index the index identifying the attribute * @param value the value to assign to the attribute * @param attrDef the attribute * @throws Exception */ protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception { if ((index >= AttributesEnum.firstIndex()) && (index < AttributesEnum.count())) { AttributesEnum.staticValues()[index - AttributesEnum.firstIndex()].put(this, value); return; } super.setAttrInvokeAccessor(index, value, attrDef); } /** * @return the associated entity oracle.jbo.RowIterator. */ public RowIterator getBillOfQuantity() { return (RowIterator)getAttributeInternal(BILLOFQUANTITY); } /** * @return the associated entity oracle.jbo.RowIterator. */ public RowIterator getProjectGroups() { return (RowIterator)getAttributeInternal(PROJECTGROUPS); } /** * @return the associated entity SubsidariesImpl. */ public SubsidariesImpl getSubsidaries() { return (SubsidariesImpl)getAttributeInternal(SUBSIDARIES); } /** * Sets <code>value</code> as the associated entity SubsidariesImpl. */ public void setSubsidaries(SubsidariesImpl value) { setAttributeInternal(SUBSIDARIES, value); } /** * @param projectId key constituent * @return a Key object based on given key constituents. */ public static Key createPrimaryKey(Number projectId) { return new Key(new Object[]{projectId}); } /** * Add attribute defaulting logic in this method. * @param attributeList list of attribute names/values to initialize the row */ protected void create(AttributeList attributeList) { SequenceImpl seq = new SequenceImpl("Projects_SEQ", getDBTransaction()); Number seqNextval; seqNextval = seq.getSequenceNumber(); setProjectId(seqNextval); super.create(attributeList); } /** * Add entity remove logic in this method. */ public void remove() { super.remove(); } /** * Add locking logic here. */ public void lock() { super.lock(); } /** * Custom DML update/insert/delete logic here. * @param operation the operation type * @param e the transaction event */ protected void doDML(int operation, TransactionEvent e) { /* if (operation==DML_INSERT) { SequenceImpl seq = new SequenceImpl("Projects_SEQ", getDBTransaction()); Number seqNextval; seqNextval = seq.getSequenceNumber(); setProjectId(seqNextval); }*/ super.doDML(operation, e); } } تقديم بلاغ
بتاريخ: 15 نوفمبر 201213 سنة comment_229143 يجب فصل المشكلة ولذلك أنصحك بعمل شاشة تحتوي على الجدول الماستر فقط وجرب. إذا كانت هناك مشكلة فتكون المشكلة في الماستر أما إذا كانت المشكلة تظهر مع إضافة الجدول الفرعي فتكون المشكلة فيه. بعد تحديد مصدر المشكلة يمكن البحث في الحل تقديم بلاغ
بتاريخ: 17 نوفمبر 201213 سنة كاتب الموضوع comment_229190 يجب فصل المشكلة ولذلك أنصحك بعمل شاشة تحتوي على الجدول الماستر فقط وجرب. إذا كانت هناك مشكلة فتكون المشكلة في الماستر أما إذا كانت المشكلة تظهر مع إضافة الجدول الفرعي فتكون المشكلة فيه. بعد تحديد مصدر المشكلة يمكن البحث في الحل السلام عليكم ورحمة الله وبركاتهالمهندس/مصطفى اولا اشكرك لمتابعتك وردك الدائم وجعله الله فى ميزان حسناتك باذن اللهثانيا:قمت بالفعل بعمل شاشة تحتوى على الجدول الماستر فقط وظهر معى الخطأ ايضا وجربت ايضا ان اقوم بعمل run appmodule وايضا ظهر معى الخطأ عند تجربة عمل اضافة منه على الجدول ايضا فهل الخطأ هنا فى ال relation او فى ال appmodule وللشرح اكثر فالجدول الماستر يحتوى على 2 جدول detail ولقد جربت ان اقوم بعمل project اخر وعملت 2 bc للجدول الماستر وجدول detail واحد فقط وتم عمل insert فى الجدول الماستر وال detail ولكن يجب عمل commit للماستر قبل ان تقوم بادخال بيانات فى ال detail هذه هى التجارب التى نفذتها للوصول الى حل ولكن لا اعلم الى الان لماذا ظهر الخطأ السابق ذكره ولماذا يظهر حتى الان ولم يظهر فى ال project الجديد مع انها نفس الخطوات المنفذه سابقا ولم يتم تغير شيىء تقديم بلاغ
بتاريخ: 19 نوفمبر 201213 سنة comment_229274 قارن بين ملفي entity object بحيث تعرف الفرق بينهما تقديم بلاغ
بتاريخ: 29 نوفمبر 201213 سنة كاتب الموضوع comment_229594 قارن بين ملفي entity object بحيث تعرف الفرق بينهما السلام عليكم ورحمة الله وبركاتهلقد تم حل الامر ولكن بطريقة غير منطقية وهى كالاتىعندما اقوم بعمل BC لكل الجداول مرة واحدة يظهر لى هذا الخطأ ولكنى قمت بتجربة ان اقوم بعمل ال BC على اكثر من مرة فبدأت بالجداول التى يوجد بها المشكلة وقمت بالتجربة فلم يظهر لى اى مشاكل وعندما استكملت باقى ال BC وجربت مرة اخرى فلم يظهر لى اى مشكلة لا اعلم على وجه التحديد ما الذى حدث ولكن اصبح لدى شك فى العلاقات بين الجداول ومع العلم انى قمت بالمراجعة ولم اجد شيئا غير صحيح او شيى غريب اتمنى ان اصل للسبب فى القريب او اعرف ما الذى تغير ولكن الان لا تظهر لى المشكلة واتمنى ان اتقدم خطوة اخرى للامام حيث انها استغرقت منى وقت كبير جدا والى مشكلة جديدة اشكرك كثيرا مهندس مصطفى على مساعدتك تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.