Package org.apache.torque

Examples of org.apache.torque.ForeignKeySchemaData.save()


    public void testFillReferencedDuplicateObjects() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria().where(
                NullableOIntegerFkPeer.NAME, "nullableOIntegerFk3a");

        List<NullableOIntegerFk> fkList
View Full Code Here


    public void testFillReferencedAlreadySet() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                NullableOIntegerFkPeer.ID);
        List<NullableOIntegerFk> fkList
View Full Code Here

    public void testFillReferencedCompositeKey() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                CompIntegerVarcharFkPeer.ID);
        List<CompIntegerVarcharFk> fkList
View Full Code Here

    public void testFillReferencedNonPrimaryCompositeKey() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                CompNonpkFkPeer.ID);
        List<CompNonpkFk> fkList
View Full Code Here

    public void testFillReferencedObjectRefill() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.and(NullableOIntegerFkPeer.NAME, "nullableOIntegerFk2");
        List<NullableOIntegerFk> fkList
                = NullableOIntegerFkPeer.doSelect(criteria);
View Full Code Here

    public void testFillReferencedChunkSizeMinus1() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                RequiredPIntegerFkPeer.ID);
        List<RequiredPIntegerFk> fkList
View Full Code Here

    public void testFillReferencingPrimitiveIntegerKey() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(PIntegerPkPeer.ID);
        List<PIntegerPk> pkList = PIntegerPkPeer.doSelect(criteria);
        assertEquals(3, pkList.size());
View Full Code Here

    public void testFillReferencingObjectIntegerKey() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(OIntegerPkPeer.ID);
        List<OIntegerPk> pkList = OIntegerPkPeer.doSelect(criteria);
        assertEquals(3, pkList.size());
View Full Code Here

    public void testFillReferencingDuplicateObjects() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria().where(
                OIntegerPkPeer.NAME, "oIntegerPk2");

        List<OIntegerPk> pkList
View Full Code Here

    public void testFillReferencingNonPrimaryKey() throws Exception
    {
        ForeignKeySchemaData.clearTablesInDatabase();
        ForeignKeySchemaData testData
                = ForeignKeySchemaData.getDefaultTestData();
        testData.save();

        Criteria criteria = new Criteria();
        criteria.addAscendingOrderByColumn(
                OIntegerPkPeer.ID);
        List<OIntegerPk> pkList
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.